Strings are sequences of characters. The length of a string is the number of characters that it contains. This number is fixed when the string is created. The valid indices of a string are the integers less than the length of the string. The first character of a string has index 0, the second has index 1, and so on.
Kawa note: Kawa’s implementation of strings that contain surrogate characters does not quite follow the R6RS specification. Specifically indexing into such a string retrieves a surrogate rather than a Unicode scalar value. It is not clear what the best solution is - there is a tradeoff between performance, compatibility with R6RS, and interoperability with Java APIs.
objis a string,
Return a newly allocated string of length
charis given, then all elements of the string are initialized to
char, otherwise the contents of the
Return a newly allocated string composed of the arguments.
Return the number of characters in the given
stringas an exact integer object.
kmust be a valid index of
string-refprocedure returns character
stringusing zero–origin indexing.
#tif the strings are the same length and contain the same characters in the same positions. Otherwise, the
#f.(string=? "Straße" "Strasse") ⇒ #f
These procedures are the lexicographic extensions to strings of the corresponding orderings on characters. For example,
string<?is the lexicographic ordering on strings induced by the ordering
char<?on characters. If two strings differ in length but are the same up to the length of the shorter string, the shorter string is considered to be lexicographically less than the longer string.(string<? "z" "ß") ⇒ #t (string<? "z" "zz") ⇒ #t (string<? "z" "Z") ⇒ #f
stringmust be a string, and
endmust be exact integer objects satisfying:0 <=
substringprocedure returns a newly allocated string formed from the characters of
stringbeginning with index
start(inclusive) and ending with index
Return a newly allocated string whose characters form the concatenation of the given strings.
listmust be a list of characters.
string->listprocedure returns a newly allocated list of the characters that make up the given string.
list->stringprocedure returns a newly allocated string formed from the characters in
list->stringprocedures are inverses so far as
Returns a newly allocated copy of the given