count-substring <substring> in <string> to <count> [ case-insensitive [ <case insensitive> ] ]Copied!
set-string sub = "world" set-string str = "Hello world and hello World!" count-substring sub in str to num_occ pf-out "Found %ld occurrences!\n", num_occ count-substring sub in str to num_occ case-insensitive pf-out "Found %ld occurrences!\n", num_occCopied!