remove unused word, make some stuff compile
parent
ccdcacfd04
commit
94d7772c13
|
@ -11,11 +11,7 @@ IN: unicode.collation.tests
|
||||||
: test-two ( str1 str2 -- )
|
: test-two ( str1 str2 -- )
|
||||||
[ +lt+ ] -rot [ string<=> ] 2curry unit-test ;
|
[ +lt+ ] -rot [ string<=> ] 2curry unit-test ;
|
||||||
|
|
||||||
: failures
|
: test-equality ( str1 str2 -- )
|
||||||
parse-test dup 2 <clumps>
|
|
||||||
[ string<=> +lt+ = not ] assoc-filter dup assoc-size ;
|
|
||||||
|
|
||||||
: test-equality
|
|
||||||
{ primary= secondary= tertiary= quaternary= }
|
{ primary= secondary= tertiary= quaternary= }
|
||||||
[ execute ] with with each ;
|
[ execute ] with with each ;
|
||||||
|
|
||||||
|
|
|
@ -100,8 +100,8 @@ ducet insert-helpers
|
||||||
] { } map-as concat ;
|
] { } map-as concat ;
|
||||||
|
|
||||||
: append-weights ( weights quot -- )
|
: append-weights ( weights quot -- )
|
||||||
swap [ ignorable?>> not ] filter
|
[ [ ignorable?>> not ] filter ] dip
|
||||||
swap map [ zero? not ] filter % 0 , ;
|
map [ zero? not ] filter % 0 , ; inline
|
||||||
|
|
||||||
: variable-weight ( weight -- )
|
: variable-weight ( weight -- )
|
||||||
dup ignorable?>> [ primary>> ] [ drop HEX: FFFF ] if , ;
|
dup ignorable?>> [ primary>> ] [ drop HEX: FFFF ] if , ;
|
||||||
|
@ -135,7 +135,7 @@ PRIVATE>
|
||||||
<PRIVATE
|
<PRIVATE
|
||||||
: insensitive= ( str1 str2 levels-removed -- ? )
|
: insensitive= ( str1 str2 levels-removed -- ? )
|
||||||
[
|
[
|
||||||
swap collation-key swap
|
[ collation-key ] dip
|
||||||
[ [ 0 = not ] trim-right but-last ] times
|
[ [ 0 = not ] trim-right but-last ] times
|
||||||
] curry bi@ = ;
|
] curry bi@ = ;
|
||||||
PRIVATE>
|
PRIVATE>
|
||||||
|
@ -158,8 +158,7 @@ PRIVATE>
|
||||||
PRIVATE>
|
PRIVATE>
|
||||||
|
|
||||||
: sort-strings ( strings -- sorted )
|
: sort-strings ( strings -- sorted )
|
||||||
[ w/collation-key ] map
|
[ w/collation-key ] map natural-sort values ;
|
||||||
natural-sort values ;
|
|
||||||
|
|
||||||
: string<=> ( str1 str2 -- <=> )
|
: string<=> ( str1 str2 -- <=> )
|
||||||
[ w/collation-key ] compare ;
|
[ w/collation-key ] compare ;
|
||||||
|
|
Loading…
Reference in New Issue