mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-15 09:23:44 +00:00
Estimated hours taken: 1 Branches: main Add some new predicates to the string module. library/string: Add a new predicate string.is_all_digits/1 that tests whether a string consists entirely of decimal digits. Export the predicate string.all_match/2. Add string.remove_prefix/3 which is a synonym for the string.append(in, uo, in) except that it has a more meaningful name and the argument ordering is more convenient for use with higher-order code. profiler/demangle.m: Do not define remove_prefix/3 here; use the one from the standard library instead. NEWS: Announce the new additions. tests/general/string_test.m: tests/general/string_test_2.m: tests/general/string_test_2.exp: Add a test for remove_prefix/3. Update the syntax used in these files, e.g. replace DCGs with state variables etc. tests/general/.cvsignore: Ignore generated files.
7 lines
36 B
Plaintext
7 lines
36 B
Plaintext
abcdef
|
|
abcdef
|
|
abcdef
|
|
abcdef
|
|
def
|
|
def
|