Files
mercury/tests/hard_coded/string_split.exp
Ondrej Bojar 1ab474865c A few handy functions for splitting a string added.
Estimated hours taken: 3
Branches: main

A few handy functions for splitting a string added.

library/string.m:
    Added remove_suffix_if_present, split_at_separator, split_at_char,
    split_at_string

tests/hard_coded/string_split.m:
    A simple test of split_at_* functions.

tests/hard_coded/string_split.exp:
    Expected results of the tests of split_at_* functions.

tests/hard_coded/string_various.m:
    Created. Added testcase for remove_suffix_if_present.

tests/hard_coded/string_various.exp:
    Created. Added results for remove_suffix_if_present.

NEWS:
    Added a comment that the functions have been added.
2007-02-02 05:39:58 +00:00

7 lines
176 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>