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


Guile Reference Manual

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

39.11.8 Prefixes/Suffixes

Using these procedures you can determine whether a given string is a prefix or suffix of another string or how long a common prefix/suffix is.

Scheme Procedure: string-prefix-length s1 s2 [start1 end1 start2 end2]
Scheme Procedure: string-prefix-length-ci s1 s2 [start1 end1 start2 end2]
Scheme Procedure: string-suffix-length s1 s2 [start1 end1 start2 end2]
Scheme Procedure: string-suffix-length-ci s1 s2 [start1 end1 start2 end2]
Return the length of the longest common prefix/suffix of the two strings. string-prefix-length-ci and string-suffix-length-ci are the case-insensitive variants.

Scheme Procedure: string-prefix? s1 s2 [start1 end1 start2 end2]
Scheme Procedure: string-prefix-ci? s1 s2 [start1 end1 start2 end2]
Scheme Procedure: string-suffix? s1 s2 [start1 end1 start2 end2]
Scheme Procedure: string-suffix-ci? s1 s2 [start1 end1 start2 end2]
Is s1 a prefix/suffix of s2. string-prefix-ci? and string-suffix-ci? are the case-insensitive variants.


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