1
0
forked from GitHub/gf-core

toUpperFirst and toLowerFirst in Prelude

This commit is contained in:
aarne
2013-08-01 15:42:37 +00:00
parent f1d407de09
commit ea65882c53

View File

@@ -138,5 +138,17 @@ oper
eNext : ENumber -> ENumber = \e -> case e of {
E0 => E1 ; E1 => E2 ; _ => Emore} ;
-- convert initial to upper/lower
toUpperFirst : Str -> Str = \s -> case s of {
x@? + xs => Predef.toUpper x + xs ;
_ => s
} ;
toLowerFirst : Str -> Str = \s -> case s of {
x@? + xs => Predef.toLower x + xs ;
_ => s
} ;
}