Raymond Racine <ray.racine@gmail.com>
procedure
( null-string? s)→Boolean
s:String
Is the string the empty string?
procedure
( default-string sdefault)→String
s:Stringdefault:String
If given string s is the null-string? return the default String, otherwise the String s.
procedure
( starts-with-char? sch)→Boolean
s:Stringch:Char
Does the string start with the char.
procedure
( ends-with-char? sch)→Boolean
s:Stringch:Char
Does the string end with the char.
procedure
( starts-with? sprefix)→Boolean
s:Stringprefix:String
Does the string start with the given prefix.
procedure
( string-first-char-occurrence sch)→(OptionIndex)
s:Stringch:Char
Returns the index of the first occurrence of the character in the string scanning from left to right. Returns #f if the character is not found in the string.
procedure
( string-common-prefix-length s1s2)→Index
s1:Strings2:String
Given two strings returns the index of their longest common prefix from left to right. In other words, the first index position before the two strings start to diverge.
Returns the common prefix string from left to right between two strings.
procedure
( string-tokenize sdelims)→(ListofString)
s:Stringdelims:Char-Set
Split the string into tokens using the set of char delimiters.
procedure
( weave-string-separator seplst)→String
sep:Stringlst:(ListofString)
Weave a the separator string between each string in the list and then reduce to a single string value.
For example:
"1,2,3""1"
procedure
( substring-trim-spaces sstart-posend-pos)→String
s:Stringstart-pos:Integerend-pos:Integer
Extracts a substring from the start index inclusive to the end index exclusive. Spaces are trimmed from both ends.