AllOffsets is a LiveCode function that returns a comma-delimited list of all the offsets of a character in a string. It does this by setting the item delimiter and parsing the items of the string, instead of using the more obvious offset function with the characters-to-skip parameter. As a result it is about 30% faster for simple strings (strings without multi-byte characters) and substantially to extremely (hundreds of times) faster for strings that include multibyte characters -- in testing on a 50,000-character string, it was 300x faster.
forked from gcanyon/alloffsets
-
Notifications
You must be signed in to change notification settings - Fork 0
bwmilby/alloffsets
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
About
A LiveCode function to return the offsets of a character in a string. Uses items. Is much faster than the built-in offset function with chars-to-skip.
Resources
Stars
Watchers
Forks
Packages 0
No packages published