upper? was copy/pasted and WRONG. found with extra/lint
parent
6f058a30ca
commit
1e53cf6c9f
|
@ -16,3 +16,9 @@ USING: unicode.case tools.test namespaces ;
|
||||||
"lt" locale set
|
"lt" locale set
|
||||||
! Lithuanian casing tests
|
! Lithuanian casing tests
|
||||||
] with-scope
|
] with-scope
|
||||||
|
|
||||||
|
[ t ] [ "asdf" lower? ] unit-test
|
||||||
|
[ f ] [ "asdF" lower? ] unit-test
|
||||||
|
|
||||||
|
[ t ] [ "ASDF" upper? ] unit-test
|
||||||
|
[ f ] [ "ASDf" upper? ] unit-test
|
||||||
|
|
|
@ -100,11 +100,10 @@ SYMBOL: locale ! Just casing locale, or overall?
|
||||||
: >case-fold ( string -- fold )
|
: >case-fold ( string -- fold )
|
||||||
>upper >lower ;
|
>upper >lower ;
|
||||||
|
|
||||||
: lower? ( string -- ? )
|
: lower? ( string -- ? ) dup >lower = ;
|
||||||
dup >lower = ;
|
|
||||||
: upper? ( string -- ? )
|
: upper? ( string -- ? ) dup >upper = ;
|
||||||
dup >lower = ;
|
|
||||||
: title? ( string -- ? )
|
: title? ( string -- ? ) dup >title = ;
|
||||||
dup >title = ;
|
|
||||||
: case-fold? ( string -- ? )
|
: case-fold? ( string -- ? ) dup >case-fold = ;
|
||||||
dup >case-fold = ;
|
|
||||||
|
|
Loading…
Reference in New Issue