 : replace ( old new str -- newstr )
     [ split-subseq ] dip join ; inline
 
-: i-dot? ( -- ? )
-    locale get { "tr" "az" } member? ;
+: i-dot? ( locale -- ? )
+    { "tr" "az" } member? ; inline
 
-: lithuanian? ( -- ? ) locale get "lt" = ;
+: lithuanian? ( locale -- ? ) "lt" = ; inline
 
 : lithuanian>upper ( string -- lower )
     "i\u000307" "i" replace

        [ char-quot call out push ] ?if
    ] each out "" like ; inline

PRIVATE>

: >lower ( string -- lower )
    i-dot? [ turk>lower ] when
    lithuanian? [ lithuanian>lower ] when
    final-sigma
    [ lower>> ] [ ch>lower ] map-case ;

HINTS: >lower string ;

: >upper ( string -- upper )
    i-dot? [ turk>upper ] when
    lithuanian? [ lithuanian>upper ] when
    [ upper>> ] [ ch>upper ] map-case ;

HINTS: >upper string ;

<PRIVATE

: (>title) ( string -- title )
    locale>upper
    [ title>> ] [ ch>title ] map-case ; inline

PRIVATE>
