mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-15 17:33:38 +00:00
Estimated hours taken: 1 Branches: main library/string.m: Fix an off-by-one bug in string.split_at_separator. The index in the initial call to split_at_separator2 was one past the end of the string, which worked in the C backends because strings are NUL terminated. Rename split_at_separator2 to split_at_separator_2 and make it more readable. tests/hard_coded/string_split.exp: tests/hard_coded/string_split.m: Add a couple of cases which seem more likely to fail with an incorrect implementation.
9 lines
179 B
Plaintext
9 lines
179 B
Plaintext
|
|
!
|
|
hello:world:how:are:you!
|
|
hello<tab>world<tab>how<tab>are<tab><tab>you!
|
|
user<tab>group<tab>id1<tab>id2
|
|
x<tab>ay<tab>az
|
|
x<tab>a <tab>aax <tab> x
|
|
col1<tab>col2:val2<tab>col3<tab>
|