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


Guile Reference Manual

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

21.4.9 Alphabetic Case Mapping

These are procedures for mapping strings to their upper- or lower-case equivalents, respectively, or for capitalizing strings.

Scheme Procedure: string-upcase str
C Function: scm_string_upcase (str)
Return a freshly allocated string containing the characters of str in upper case.

Scheme Procedure: string-upcase! str
C Function: scm_string_upcase_x (str)
Destructively upcase every character in str and return str.
 
y                  => "arrdefg"
(string-upcase! y) => "ARRDEFG"
y                  => "ARRDEFG"

Scheme Procedure: string-downcase str
C Function: scm_string_downcase (str)
Return a freshly allocation string containing the characters in str in lower case.

Scheme Procedure: string-downcase! str
C Function: scm_string_downcase_x (str)
Destructively downcase every character in str and return str.
 
y                     => "ARRDEFG"
(string-downcase! y)  => "arrdefg"
y                     => "arrdefg"

Scheme Procedure: string-capitalize str
C Function: scm_string_capitalize (str)
Return a freshly allocated string with the characters in str, where the first character of every word is capitalized.

Scheme Procedure: string-capitalize! str
C Function: scm_string_capitalize_x (str)
Upcase the first character of every word in str destructively and return str.

 
y                      => "hello world"
(string-capitalize! y) => "Hello World"
y                      => "Hello World"


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