Jussi Pakkanen
e75e3976fa
Condense test directory names.
4 years ago
Tristan Partin
c83106ee38
Add str.replace() method
4 years ago
Jussi Pakkanen
9d1e747d17
Condense test directory names again.
4 years ago
Stéphane Cerveau
8f106a2b9a
string: add substring method
...
This method aims to offer a simple way to 'substring'
an existing string with start and end values.
4 years ago
Dylan Baker
29ef4478df
compilers/d: Add b_ndebug support
...
D lang compilers have an option -release (or similar) which turns off
asserts, contracts, and other runtime type checking. This patch wires
that up to the b_ndebug flag.
Fixes #7082
5 years ago
Jussi Pakkanen
f39600647d
Condense test directory names.
5 years ago
Jussi Pakkanen
972535a6ac
Condense test dirs.
6 years ago
Nirbheek Chauhan
a5b99dce5d
Add more tests for multi-line strings and update docs
7 years ago
Niklas Claesson
cb0960a91e
Remove escaping for triple-quoted strings
...
Fixes #3429
7 years ago
Tim 'mithro' Ansell
36aab0f4b2
Complete python escape sequences aware strings
...
Fixes #3169
7 years ago
Joergen Ibsen
312bc2ca81
Fix string format recursive replace
...
Also error on placeholder index out of range.
7 years ago
Joergen Ibsen
dad5779d3c
Add test for five escapes before n
7 years ago
Joergen Ibsen
b9a0589067
Fix escaping of newlines in string literals
...
Replace '\n' escape sequence before '\\' to allow a literal backslash
to be inserted before the character 'n'.
Fixes #2682
7 years ago
Nirbheek Chauhan
276e9c15cc
str.split() can now take a positional argument
...
All the specified characters in the specified argument will be
stripped. If unspecified, the old behaviour is used.
Includes tests.
7 years ago
Jussi Pakkanen
b5013a573a
Added semantic versioning comparison method to strings.
9 years ago
Jussi Pakkanen
2a3a1ce8e0
Join() convenience method for strings. Closes #552 .
9 years ago
Tim-Philipp Müller
3eea1703ff
Add bool to_string() and to_int() methods
...
bool to_int() will return 0 or 1, useful if one wants to set
a define to 0 or 1 based on a boolean result instead of having
it just defined or undefined.
bool to_string() will return 'true' or 'false' by default same
as when using it to format a string, but with the additional
possibility to specify two extra string arguments to be returned
as true/false values, e.g. to_string('yes', 'no'). This can be
useful when outputting messages to be shown to the user.
9 years ago
Jussi Pakkanen
f3e20b2570
Use assert instead of if/error.
9 years ago
Tim-Philipp Müller
3c8468cd4d
Add string underscorify() function
...
So we can easily construct the defines for include headers and
struct checks and such.
9 years ago
Tim-Philipp Müller
02e84df010
Add more string functions: contains(), to_upper() and to_lower()
9 years ago
Jussi Pakkanen
0c96dbff3a
String to int conversion. Closes #362 .
9 years ago
Jussi Pakkanen
df979ad422
String startswith and endswith methods.
9 years ago
Jussi Pakkanen
08d18671ae
Better.
12 years ago
Jussi Pakkanen
3b4e77a658
String formatting functionality.
12 years ago