www.delorie.com/gnu/docs/guile/guile_476.html   search  
 
Buy GNU books!


Guile Reference Manual

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

39.11.15 Filtering/Deleting

Filtering means to remove all characters from a string which do not match a given criteria, deleting means the opposite.

Scheme Procedure: string-filter s char_pred [start end]
Filter the string s, retaining only those characters that satisfy the char_pred argument. If the argument 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 character set, it is tested for membership.

Scheme Procedure: string-delete s char_pred [start end]
Filter the string s, retaining only those characters that do not satisfy the char_pred argument. If the argument 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 character set, it is tested for membership.


  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003