Next: Unicode Representations, Previous: Unicode, Up: Unicode
Wide characters can be combined into wide strings, which are similar to strings but can contain any Unicode character sequence. The implementation used for wide strings is guaranteed to provide constant-time access to each character in the string.
Returns a newly allocated wide string of length k. If char is specified, all elements of the returned string are initialized to char; otherwise the contents of the string are unspecified.
Returns a newly allocated wide string consisting of the specified characters.
Returns the length of wide-string as an exact non-negative integer.
Returns character k of wide-string. K must be a valid index of string.
Stores char in element k of wide-string and returns an unspecified value. K must be a valid index of wide-string.
Returns a newly allocated wide string with the same contents as string. If start and end are supplied, they specify a substring of string that is to be converted. Start defaults to `0', and end defaults to `(string-length string)'.
Returns a newly allocated string with the same contents as wide-string. The argument wide-string must satisfy
wide-string?
. If start and end are supplied, they specify a substring of wide-string that is to be converted. Start defaults to `0', and end defaults to `(wide-string-length wide-string)'.It is an error if any character in wide-string fails to satisfy
char-ascii?
.
Returns a new input port that sources the characters of wide-string. The optional arguments start and end may be used to specify that the port delivers characters from a substring of wide-string; if not given, start defaults to `0' and end defaults to `(wide-string-length wide-string)'.
Returns an output port that accepts Unicode characters and strings and accumulates them in a buffer. Call
get-output-string
on the returned port to get a wide string containing the accumulated characters.
Creates a wide-string output port and calls procedure on that port. The value returned by procedure is ignored, and the accumulated output is returned as a wide string. This is equivalent to:
(define (call-with-wide-output-string procedure) (let ((port (open-wide-output-string))) (procedure port) (get-output-string port)))