Next: , Previous: , Up: srfi strings spec   [Index]


2.8.3.10 Alphabetic case mapping

Function: string-titlecase str
Function: string-titlecase str start
Function: string-titlecase str start end

For every character ch in the selected range of str, if ch is preceded by a cased character, it is downcased; otherwise it is titlecased. Return the result string and does not alter the str argument.

Examples:

(string-titlecase "--capitalize tHIS sentence.")
⇒ "--Capitalize This Sentence."

(string-titlecase "see Spot run. see Nix run.")
⇒ "See Spot Run. See Nix Run."

(string-titlecase "3com makes routers.")
⇒ "3Com Makes Routers."

Note that if a start index is specified, then the character preceding str[start] has no effect on the titlecase decision for character str[start]:

(string-titlecase "greasy fried chicken" 2)
⇒ "Easy Fried Chicken"

Titlecase and cased information must be compatible with the Unicode specification.

Function: string-titlecase! str
Function: string-titlecase! str start
Function: string-titlecase! str start end

In–place side–effecting variant.

Function: string-upcase str
Function: string-upcase str start
Function: string-upcase str start end

Raise the case of the selected alphabetic characters in the string. Return the result string and does not alter the str argument.

Function: string-upcase! str
Function: string-upcase! str start
Function: string-upcase! str start end

In–place side–effecting variant.

Function: string-downcase str
Function: string-downcase str start
Function: string-downcase str start end

Lower the case of the selected alphabetic characters in the string. Return the result string and does not alter the str argument.

Function: string-downcase! str
Function: string-downcase! str start
Function: string-downcase! str start end

In–place side–effecting variant.


Next: , Previous: , Up: srfi strings spec   [Index]