|
| auto | str::idx (string s, number i) -> string|number |
| | Index a string as if first character has index 1.
|
| |
| auto | str::idx0 (string s, number i) -> string|number |
| | Index a string as if first character has index 0, with negative indexing.
|
| |
| string | str::slice (string s, number a, number b) |
| | Slice a string as if first character has index 1.
|
| |
| string | str::slice0 (string s, number a, number b) |
| | Slice a string as if first character has index 0.
|
| |
| auto | str::find (string s1, string s2, number a, number b) -> string|number |
| | Lowest index starting from 1 where a substring is found in a string or its slice starting from 1.
|
| |
| auto | str::find0 (string s1, string s2, number a, number b) -> string|number |
| | Lowest index starting from 0 where a substring is found in a string or its slice starting from 0.
|
| |
| auto | str::indices (array R, string s1, string s2) |
| | Get indices, starting from 1, where a substring is found in a string, non-overlapping.
|
| |
| auto | str::rfind (string s1, string s2, number a, number b) -> string|number |
| | Highest index starting from 1 where a substring is found in a string or its slice starting from 1.
|
| |
| auto | str::rfind0 (string s1, string s2, number a, number b) -> string|number |
| | Highest index starting from 0 where a substring is found in a string or its slice starting from 0.
|
| |
| unassigned | str::partition (array A, string s, string sep) |
| | Split the string at the first occurrence of a separator.
|
| |
| unassigned | str::rpartition (array A, string s, string sep) |
| | Split the string at the last occurrence of a separator.
|
| |
| number | str::splitLines (string s, array A) |
| | Split lines in a string at line boundaries.
|
| |
| string | str::join (array A, string s=" ") |
| | Join array elements with separator.
|
| |
| number | str::startsWith (string s1, string s2) |
| | Check if string starts with specific prefix.
|
| |
| number | str::endsWith (string s1, string s2) |
| | Check if string ends with specific suffix.
|
| |
| string | str::rep (string s, number n) |
| | Repeat string n number of times.
|
| |
| string | str::escapeRe (string s) |
| | Escape regex special characters.
|
| |
| string | str::replaceIdx (string s, string rep, number idx) |
| | Replace a character in a specific index with a string.
|
| |
| string | str::replaceRange (string s, string rep, number i, number n) |
| | Replace a string in a specific index range with a string. Similar to substr()
|
| |
| string | str::rmPrefix (string s, string pre) |
| | Remove matching prefix.
|
| |
| string | str::rmSuffix (string s, string suf) |
| | Remove matching suffix.
|
| |
| string | str::lstrip (string s, string chars) |
| | Remove leading characters.
|
| |
| string | str::rstrip (string s, string chars) |
| | Remove trailing characters.
|
| |
| string | str::strip (string s, string chars) |
| | Remove leading and trailing characters.
|
| |
| unassigned | str::chars (array A, string s, number i0=1) |
| | Fill indexed array with characters in a string.
|
| |
| unassigned | str::fields (array A) |
| | Fill indexed array with awk fields.
|
| |
| string | str::lc (string s) |
| | Lower case.
|
| |
| string | str::uc (string s) |
| | Upper case.
|
| |
| auto | str::ucfirst (s) |
| | Upper case first character.
|
| |
| auto | str::lcfirst (s) |
| | Lower case first character.
|
| |
| string | str::tc (string s) |
| | Title case a string.
|
| |
| string | str::tclc (string s) |
| | Title case a string and rest lower case.
|
| |
| string | str::ltrim (string s) |
| | Remove leading blanks.
|
| |
| string | str::rtrim (string s) |
| | Remove trailing blanks.
|
| |
| string | str::trim (string s) |
| | Remove leading and trailing blanks.
|
| |
| string | str::chop (string s, number n=1) |
| | Remove last characters.
|
| |
| string | str::chomp (string s) |
| | Remove last character if it is linebreak \n
|
| |
| string | str::rev (string s) |
| | Revert string.
|
| |
| string | str::chr (number n) |
| | Chr function.
|
| |
| auto | str::_ord_init (number l=0, number h=1114111) |
| | Fill the ord table.
|
| |
| number | str::ord (string s) |
| | Ord function.
|
| |
| string | str::indent (string s, string|number i) |
| | Indent.
|
| |
| string | str::ljust (string s, number w, string c=" ", number l) |
| | Left justify.
|
| |
| string | str::rjust (string s, number w, string c=" ", number l) |
| | Right justify.
|
| |
| auto | str::serialize (x) |
| | Serialized representation of a string.
|
| |
| string | str::repr (any x) |
| | String representation of a variable.
|
| |
| string | str::csvQuote (string s) |
| | CSV-quote a string.
|
| |
| auto | str::comb () |
| |