CamelCase in Nimrod
Example for versions
Nimrod 0.8.8
This example uses regular expressions. In Nimrod they are implemented using PRCE (Perl-Compatible Regular Expressions) library written in C.
from strutils import toLower, capitalize, join
import re
var text = toLower(readLine(stdin))
var words = split(text, re"[^a-z]+")
echo join(words.each(capitalize))
Comments
]]>blog comments powered by Disqus
]]>