[ESL - Index ]
(NOTE: should probably use code from the current libs in the archive)
?
s = trim_left(s)
Takes a string and returns the string minus leading spaces.
new
Status: proposed
s = trim_right(s)
Takes a string and returns the string minus trailing spaces.
new
Status: proposed
s = trim(s)
Takes a string and returns the string minus leading and trailing spaces.
Status: proposed
s = escape_chars(s)
Takes a string and returns the string but all characters that need to be escaped
are (turns the string " \"' " to " \\\"\' ").
Status: proposed
s = split(s1, s2)
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"}).
changed
Status: proposed
i = match_word(w, s, delimChars)
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 list 'delimChars'.
new
Status: proposed
see also : replace_word()
s = replace_word(source, whatToReplace, replaceWith, matchCase, delimChars)
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.
new
Status: proposed
see also : match_word(),
replace_substring(),
replace_element()
s = replace_substring(source, whatToReplace, replaceWith, matchCase)
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.
new
Status: proposed
see also : replace_word(),
replace_element()