8.5.9 Strings
Strings are sequences of characters.
[118] string = " string-element* "
[119] string-element = any-character-other-than-"-or-\ | \" | \\ | \character-name;?
Strings are written as sequences of characters enclosed within doublequotes (").  A doublequote may be written inside a string by escaping it with a backslash (\), as in
"The word \"recursion\" has many meanings."
A backslash may be written inside a string by escaping it with another backslash. Any character may be written inside a string by writing its name after a backslash.  The name shall be followed by a semi-colon, unless there are no following characters in the string, or the following character is not a subsequent. The name used here is the same as the name used in #\ syntax for characters.
A string constant may continue from one record to the next and shall contain the characters that separate the two records in the entity.
The length of a string is the number of characters that it contains.  This number is a non-negative integer that is fixed when the string is created.  The valid indexes of a string are the exact non-negative 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.
In phrases such as the characters of string beginning with index start and ending with index end, it is understood that the index start is inclusive and the index end is exclusive.  Thus, if start and end are the same index, a null substring is referred to, and if start is zero and end is the length of string, then the entire string is referred to.
Some of the procedures that operate on strings ignore the difference between upper and lower case by converting the strings to upper case before performing the operation. The versions that ignore case have -ci (for case-insensitive) embedded in their names.
8.5.9.1 String Type Predicate
(string? obj)
Returns #t if obj is a string, and otherwise returns #f.
8.5.9.2 String Construction
(string char )
Returns a string composed of the arguments.
8.5.9.3 String Length
(string-length string)
Returns the number of characters in the given string.
8.5.9.4 String Access
(string-ref string k)
k shall be a valid index of string. string-ref returns character k of string using zero-origin indexing.
8.5.9.5 String Equivalence
(string=? string1 string2)
(string-ci=? string1 string2)
Return #t if the two strings are the same length and contain the same characters in the same positions, and otherwise return #f. string-ci=? treats upper- and lower-case letters as though they were the same character, but string=? treats upper- and lower-case letters as distinct characters. string-ci=? uses the current language.
(string-equiv? string1 string2 k)
Returns #t if the two strings compare the same at the first k comparison levels of the collation specification of the current language, and otherwise returns #f.  k shall be strictly positive.
8.5.9.6 String Comparison
(string<? string1 string2)
(string>? <string1 string2)
(string<=? string1 string2)
(string>=? string1 string2)
(string-ci<? string1 string2)
(string-ci>? string1 string2)
(string-ci<=? string1 string2)
(string-ci>=? string1 string2)
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. These procedures use the current language.
8.5.9.7 Substring Extraction
(substring string start end)
Returns a string formed from the characters of string beginning with index start (inclusive) and ending with index end (exclusive).
8.5.9.8 String Appendance
(string-append string )
Returns a string formed by the concatenation of the given strings.
8.5.9.9 Conversion between Strings and Lists
(string->list string)
(list->string chars)
string->list returns a list of the characters that make up the given string.  list->string returns a string formed from the characters in the list chars.  string->list and list->string are inverses so far as equal? is concerned.