]> gitweb.factorcode.org Git - factor.git/blob - extra/splitting/extras/extras-docs.factor
factor: trim more using lists.
[factor.git] / extra / splitting / extras / extras-docs.factor
1 USING: help.markup help.syntax sequences splitting ;
2 IN: splitting.extras
3
4 HELP: split*-when
5 { $values { "seq" sequence } { "quot" { $quotation ( ... elt -- ... ? ) } } { "pieces" "a new array" } }
6 { $description "A variant of " { $link split-when } " that includes the elements along which the sequence was split." }
7 { $examples { $example "USING: ascii kernel prettyprint splitting.extras ;" "\"hello,world-how.are:you\" [ letter? not ] split*-when ." "{ \"hello\" \",\" \"world\" \"-\" \"how\" \".\" \"are\" \":\" \"you\" }" } } ;
8
9 { split*-when split*-when-slice } related-words
10
11 HELP: split*
12 { $values { "seq" sequence } { "separators" sequence } { "pieces" "a new array" } }
13 { $description "A variant of " { $link split } " that includes the elements along which the sequence was split." }
14 { $examples { $example "USING: prettyprint splitting.extras ;" "\"hello world-how are you?\" \" -\" split* ." "{ \"hello\" \" \" \"world\" \"-\" \"how\" \" \" \"are\" \" \" \"you?\" }" } } ;
15
16 { split* split*-slice } related-words
17
18 HELP: split-find
19 { $values { "seq" sequence } { "quot" { $quotation ( seq -- i ) } } { "pieces" "a new array" } }
20 { $description "Splits a sequence into slices using the provided quotation to find split points." } ;
21
22 { split-when-harvest split-when-slice-harvest } related-words