Strings¶
- substr(theString, startIndex, len)¶
Returns the substring of theString starting at startIndex with length len, or as much as exists, otherwise an empty string
- strindex(theString, regexp[, endIndex])¶
Returns the index of the first occurrence of regexp in theString, or -1 if not found. regexp is interpreted as a regular expression: any of the characters ^.[$'`()|*+?\{ must be quoted with a preceeding \ . See https://man.openbsd.org/re_format or type “man re_format” in a Terminal window for a detailed description of regular expression. If endIndex is supplied, it receives the index of the first character after the match.
- trimWhitespace(theString)¶
Returns the substring of theString with leading and trailing spaces, tabs, and newlines removed.