unicode.case: slightly faster >title.

John Benediktsson 2012-08-24 15:14:48 -07:00
parent 7de0c0cb69
commit d1adbba44e
1 changed files with 3 additions and 2 deletions

View File

@ -107,10 +107,11 @@ HINTS: >upper string ;
PRIVATE>
: capitalize ( string -- title )
unclip 1string [ >lower ] [ (>title) ] bi* prepend ; inline
unclip-slice 1string [ >lower ] [ (>title) ] bi*
"" prepend-as ; inline
: >title ( string -- title )
final-sigma >words [ capitalize ] map concat ;
final-sigma >words [ capitalize ] map! concat ;
HINTS: >title string ;