Email list hosting service & mailing list manager

Titlecase John.Cowan (21 Jul 2005 01:20 UTC)
Re: Titlecase David Van Horn (21 Jul 2005 01:41 UTC)
Re: Titlecase John.Cowan (21 Jul 2005 02:10 UTC)
Re: Titlecase Alex Shinn (21 Jul 2005 01:56 UTC)
Re: Titlecase John.Cowan (21 Jul 2005 02:10 UTC)

Re: Titlecase David Van Horn 21 Jul 2005 02:08 UTC

John.Cowan wrote:
> I think this SRFI should have char-titlecase and string-titlecase
> functions.  The former maps a lowercase or uppercase character into
> its titlecase equivalent, and leaves all other characters alone.
> The latter titlecases its first character and lowercases all the rest;
> it's trivial to define string-titlecase given char-titlecase, but it's
> IMHO worth having for symmetry.

String-titlecase is part of SRFI 13, although with different semantics
from what you describe.  For example:

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

string-titlecase  s [start end] -> string
string-titlecase! s [start end] -> unspecified

"For every character c in the selected range of s, if c is preceded by a
cased character, it is downcased; otherwise it is titlecased."

David