This site is a static rendering of the Trac instance that was used by R7RS-WG1 for its work on R7RS-small (PDF), which was ratified in 2013. For more information, see Home. For a version of this page that may be more recent, see StringTitlecase in WG2's repo for R7RS-large.

String­Titlecase

cowan
2015-11-12 15:06:44
1history
source

This page shows how different Schemes implement the string-titlecase procedure when the character to be titlecased has a multi-character titlecase mapping. The string-titlecase routine may come from SRFI-13, from R6RS, or may be a Scheme extension. The example used is floo, which begins with a fl ligature character.

The Unicodely correct way of titlecasing this string is to treat the ligature the same as fl, in which case the result is Floo. However, by the strict letter of R6RS, the character is passed to char-titlecase, which in this case will return its argument unchanged. What is more, if the character is not even seen as a letter, then the result will be flOo.

Result is Floo: Racket, Chicken (with the utf8 egg), Larceny

Result is floo: Scheme48/scsh, Guile, Kawa, SCM, Ypsilon, Mosh, STklos, Dfsch, Sagittarius

Result is flOo: Gauche, plain Chicken, Chez, Vicare, Sizzle

No string-titlecase procedure that I could find: MIT, Gambit, Bigloo, JScheme, KSi, Sigscheme, Shoe MiniScheme, TinyScheme, Scheme 9, S7, XLisp, Rep, Schemik, UMB, Elk, Llava, SXi, FemtoLisp, LMU, Inlab, Foment, Picrin, Owl Lisp, Chibi

Failure of some other kind: IronScheme, NexJ, RScheme, Unlikely, SIOD, BD