unicode.case: slightly faster >title.

db4
John Benediktsson 2012-08-24 15:14:48 -07:00
parent 8637c1c012
commit 625da03282
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 ;