Skip to content
Chris Petersen edited this page Oct 16, 2014 · 1 revision

string-capitalize! converts the first letter of every word in the original string to an uppercase. Non first letters will be converted to lower case. This one replaces the original string too!

Parameter Description
str Input string

Example

Example 1: Show the usage of string-capitalize!, which replaces the original string too

> (define mystr "hello you. Hello hELLO")
> mystr
> (string-capitalize! mystr)
"Hello You. Hello Hello"
> mystr
"Hello You. Hello Hello"
Clone this wiki locally