]> gitweb.factorcode.org Git - factor.git/commitdiff
unicode.case: rename title-word to capitalize and make it public
authorJoe Groff <arcata@gmail.com>
Fri, 22 Jan 2010 23:06:04 +0000 (15:06 -0800)
committerJoe Groff <arcata@gmail.com>
Fri, 22 Jan 2010 23:06:04 +0000 (15:06 -0800)
basis/unicode/case/case.factor

index 79db087220e6ced846787b88826c0dea72e7d5ad..9726b6dd78f63980d9916f3b18a5b66c48c7b36c 100644 (file)
@@ -109,13 +109,13 @@ HINTS: >upper string ;
     lt? [ lithuanian>upper ] when
     [ title>> ] [ ch>title ] map-case ; inline
 
-: title-word ( string -- title )
-    unclip 1string [ >lower ] [ (>title) ] bi* prepend ; inline
-
 PRIVATE>
 
+: capitalize ( string -- title )
+    unclip 1string [ >lower ] [ (>title) ] bi* prepend ; inline
+
 : >title ( string -- title )
-    final-sigma >words [ title-word ] map concat ;
+    final-sigma >words [ capitalize ] map concat ;
 
 HINTS: >title string ;