3. Alphabetical Listing of all Routines

escape_chars

Syntax: s = escape_chars(s)
Description: Takes a string and returns the string but all characters that need to be escaped are (turns the string " \"' " to " \\\"\' ").



match_word

Syntax: i = match_word(w, s, delim_chars)
Description: Like Euphoria's match(), but only returns a value != 0 if w matches as "word". A word is considered a substring that is surrouned by any characters in the delim_chars list.



replace_substring

Syntax: s = replace_substring(source, whatToReplace, replaceWith, matchCase)
Description: Looks for all cases where match(whatToReplace, source) returns a value != 0, and replaces the sequence 'whatToReplace' with the sequence 'replaceWith'. If and only if the boolean flag 'matchCase' is TRUE, match()ing is case-sensitive. The (maybe changed) source string is returned.



replace_word

Syntax: s = replace_word(source, whatToReplace, replaceWith, matchCase, delimChars)
Description: Looks for all cases where match_word(whatToReplace, source) returns a value != 0, and replaces the sequence 'whatToReplace' with the sequence 'replaceWith'. If and only if the boolean flag 'matchCase' is TRUE, match()ing is case-sensitive. The (maybe changed) source string is returned.



split

Syntax: s = split(s1, s2)
Description: Returns a sequence where every element of s is from s2 but s2 has been divided using the string s1 as delimiter (e.g. split(" ", "this is a test") returns {"this", "is, "a", "test"}).



trim

Syntax: s = trim(s)
Description: Takes a string and returns the string minus leading and trailing spaces.



trim_left

Syntax: s = trim_left(s)
Description: Takes a string and returns the string minus leading spaces.



trim_right

Syntax: s = trim_right(s)
Description: Takes a string and returns the string minus trailing spaces.