Lines Matching refs:split

497 #### Same for split(s, 1)
499 @bench('("A"*1000).split("A", 1)', "early match, single character", 1000)
503 s1_split = s1.split
507 @bench('("A"*1000).split("B", 1)', "no match, single character", 1000)
511 s1_split = s1.split
516 @bench('("AB"*1000).split("AB", 1)', "early match, two characters", 1000)
520 s1_split = s1.split
524 @bench('("AB"*1000).split("BC", 1)', "no match, two characters", 1000)
528 s1_split = s1.split
532 @bench('("AB"*300+"C").split("BC", 1)', "late match, two characters", 1000)
536 s1_split = s1.split
540 @bench('s="ABC"*33; ((s+"D")*500+s+"E").split(s+"E", 1)',
548 s1_split = s1.split
751 #### split tests
753 @bench('("Here are some words. "*2).split()', "split whitespace (small)", 1000)
756 s_split = s.split
760 @bench('("Here are some words. "*2).rsplit()', "split whitespace (small)", 1000)
767 @bench('("Here are some words. "*2).split(None, 1)',
768 "split 1 whitespace", 1000)
771 s_split = s.split
777 "split 1 whitespace", 1000)
786 "split 1 whitespace", 1000)
795 "split 1 whitespace", 1000)
827 @bench('human_text.split()', "split whitespace (huge)", 10)
830 s_split = s.split
834 @bench('human_text.rsplit()', "split whitespace (huge)", 10)
843 @bench('"this\\nis\\na\\ntest\\n".split("\\n")', "split newlines", 1000)
846 s_split = s.split
852 @bench('"this\\nis\\na\\ntest\\n".rsplit("\\n")', "split newlines", 1000)
860 @bench('"this\\nis\\na\\ntest\\n".splitlines()', "split newlines", 1000)
867 ## split text with 2000 newlines
897 @bench('"...text...".split("\\n")', "split 2000 newlines", 10)
900 s_split = s.split
905 @bench('"...text...".rsplit("\\n")', "split 2000 newlines", 10)
913 @bench('"...text...".splitlines()', "split 2000 newlines", 10)
921 ## split text on "--" characters
923 '"this--is--a--test--of--the--emergency--broadcast--system".split("--")',
924 "split on multicharacter separator (small)", 1000)
927 s_split = s.split
933 "split on multicharacter separator (small)", 1000)
941 ## split dna text on "ACTAT" characters
942 @bench('dna.split("ACTAT")',
943 "split on multicharacter separator (dna)", 10)
946 s_split = s.split
952 "split on multicharacter separator (dna)", 10)
962 ## split with limits
968 @bench('GFF3_example.split("\\t")', "tab split", 1000)
972 s_split = s.split
976 @bench('GFF3_example.split("\\t", 8)', "tab split", 1000)
980 s_split = s.split
984 @bench('GFF3_example.rsplit("\\t")', "tab split", 1000)
992 @bench('GFF3_example.rsplit("\\t", 8)', "tab split", 1000)