(guile.info.gz) SRFI-13 Selection
Info Catalog
(guile.info.gz) SRFI-13 List/String Conversion
(guile.info.gz) SRFI-13
(guile.info.gz) SRFI-13 Modification
39.11.5 Selection
-----------------
These procedures are called "selectors", because they access
information about the string or select pieces of a given string.
Additional selector procedures are documented in the Strings section
( String Selection), like `string-length' or `string-ref'.
`string-copy' is also available in core Guile, but this version
accepts additional start/end indices.
-- Scheme Procedure: string-copy str [start end]
Return a freshly allocated copy of the string STR. If given,
START and END delimit the portion of STR which is copied.
-- Scheme Procedure: substring/shared str start [end]
Like `substring', but the result may share memory with the
argument STR.
-- Scheme Procedure: string-copy! target tstart s [start end]
Copy the sequence of characters from index range [START, END) in
string S to string TARGET, beginning at index TSTART. The
characters are copied left-to-right or right-to-left as needed -
the copy is guaranteed to work, even if TARGET and S are the same
string. It is an error if the copy operation runs off the end of
the target string.
-- Scheme Procedure: string-take s n
-- Scheme Procedure: string-take-right s n
Return the N first/last characters of S.
-- Scheme Procedure: string-drop s n
-- Scheme Procedure: string-drop-right s n
Return all but the first/last N characters of S.
-- Scheme Procedure: string-pad s len [chr start end]
-- Scheme Procedure: string-pad-right s len [chr start end]
Take that characters from START to END from the string S and
return a new string, right(left)-padded by the character CHR to
length LEN. If the resulting string is longer than LEN, it is
truncated on the right (left).
-- Scheme Procedure: string-trim s [char_pred start end]
-- Scheme Procedure: string-trim-right s [char_pred start end]
-- Scheme Procedure: string-trim-both s [char_pred start end]
Trim S by skipping over all characters on the left/right/both
sides of the string that satisfy the parameter CHAR_PRED:
* if it is the character CH, characters equal to CH are trimmed,
* if it is a procedure PRED characters that satisfy PRED are
trimmed,
* if it is a character set, characters in that set are trimmed.
If called without a CHAR_PRED argument, all whitespace is trimmed.
Info Catalog
(guile.info.gz) SRFI-13 List/String Conversion
(guile.info.gz) SRFI-13
(guile.info.gz) SRFI-13 Modification
automatically generated byinfo2html