Update all new Tasks
This commit is contained in:
parent
00a190b0a6
commit
91df62d461
5697 changed files with 93386 additions and 804 deletions
29
Task/Natural-sorting/PicoLisp/natural-sorting-1.l
Normal file
29
Task/Natural-sorting/PicoLisp/natural-sorting-1.l
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
(de parseNatural (Str)
|
||||
(clip
|
||||
(make
|
||||
(for (L (chop Str) L)
|
||||
(cond
|
||||
((sp? (car L))
|
||||
(link " ")
|
||||
(while (and L (sp? (car L)))
|
||||
(pop 'L) ) )
|
||||
((>= "9" (car L) "0")
|
||||
(link
|
||||
(format
|
||||
(make
|
||||
(loop
|
||||
(link (pop 'L))
|
||||
(NIL (>= "9" (car L) "0")) ) ) ) ) )
|
||||
(T
|
||||
(let Word
|
||||
(pack
|
||||
(replace
|
||||
(make
|
||||
(loop
|
||||
(link (lowc (pop 'L)))
|
||||
(NIL L)
|
||||
(T (sp? (car L)))
|
||||
(T (>= "9" (car L) "0")) ) )
|
||||
"ß" "ss" "ſ" "s" "ʒ" "s" ) )
|
||||
(unless (member Word '(the it to))
|
||||
(link Word) ) ) ) ) ) ) ) )
|
||||
Loading…
Add table
Add a link
Reference in a new issue