[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

10.7.1 General conventions

There are a few common factors in string library API, which I don't repeat in each function description

argument convention
The following argument names imply their types.
s, s1, s2
Those arguments must be strings.
char/char-set/pred
This argument can be a character, a character-set object, or a predicate that takes a single character and returns a boolean value. "Applying char/char-set/pred to a character" means, if char/char-set/pred is a character, it is compared to the given character; if char/char-set/pred is a character set, it is checked if the character set contains the given character; if char/char-set/pred is a procedure, it is applied to the given character. "A character satisfies char/char-set/pred" means such application to the character yields true value.

start, end
Lots of SRFI-13 functions takes these two optional arguments, which limit the area of input string from start-th character (inclusive) to end-th character (exclusive), where the operation is performed. When specified, the condition 0 <= start <= end <= length of the string must be satisfied. Default value of start and end is 0 and the length of the string, respectively.

`shared' variant
Some functions have variants with "/shared" attached to its name. SRFI-13 defines those functions to allow to share the part of input string, for better performance. Gauche doesn't have a concept of shared string, and these functions are mere synonyms of their non-shared variants. However, Gauche internally shares the storage of strings, so generally you don't need to worry about the overhead of copying substrings.

`right' variant
Most functions works from left to right of the input string. Some functions have variants with "-right" to its name, that works from right to left.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated by Ken Dickey on November, 28 2002 using texi2html