mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-12 06:41:13 +02:00
(Miscellaneous String Operations): In string-filter
and string-delete, note result may share with input string (as allowed by srfi spec).
This commit is contained in:
parent
f29749529b
commit
08de3e2424
1 changed files with 12 additions and 10 deletions
|
@ -3605,20 +3605,22 @@ of @var{s}.
|
||||||
|
|
||||||
@deffn {Scheme Procedure} string-filter s char_pred [start [end]]
|
@deffn {Scheme Procedure} string-filter s char_pred [start [end]]
|
||||||
@deffnx {C Function} scm_string_filter (s, char_pred, start, end)
|
@deffnx {C Function} scm_string_filter (s, char_pred, start, end)
|
||||||
Filter the string @var{s}, retaining only those characters that
|
Filter the string @var{s}, retaining only those characters which
|
||||||
satisfy the @var{char_pred} argument. If the argument is a
|
satisfy @var{char_pred}. The result may share storage with @var{s}.
|
||||||
procedure, it is applied to each character as a predicate, if
|
|
||||||
it is a character, it is tested for equality and if it is a
|
If @var{char_pred} is a procedure, it is applied to each character as
|
||||||
character set, it is tested for membership.
|
a predicate, if it is a character, it is tested for equality and if it
|
||||||
|
is a character set, it is tested for membership.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deffn {Scheme Procedure} string-delete s char_pred [start [end]]
|
@deffn {Scheme Procedure} string-delete s char_pred [start [end]]
|
||||||
@deffnx {C Function} scm_string_delete (s, char_pred, start, end)
|
@deffnx {C Function} scm_string_delete (s, char_pred, start, end)
|
||||||
Filter the string @var{s}, retaining only those characters that
|
Delete characters satisfying @var{char_pred} from @var{s}. The result
|
||||||
do not satisfy the @var{char_pred} argument. If the argument
|
may share storage with @var{s}.
|
||||||
is a procedure, it is applied to each character as a predicate,
|
|
||||||
if it is a character, it is tested for equality and if it is a
|
If @var{char_pred} is a procedure, it is applied to each character as
|
||||||
character set, it is tested for membership.
|
a predicate, if it is a character, it is tested for equality and if it
|
||||||
|
is a character set, it is tested for membership.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@node Conversion to/from C
|
@node Conversion to/from C
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue