March 2014 update

This commit is contained in:
Ingy döt Net 2014-04-02 16:56:35 +00:00
parent 09687c4926
commit a25938f123
1846 changed files with 21876 additions and 5203 deletions

View file

@ -1,12 +1,12 @@
import std.stdio, std.regex;
void main() {
immutable string s = "I am a string";
import std.stdio, std.regex;
// Test:
if (!match(s, r"string$").empty)
writeln("Ends with 'string'.");
immutable s = "I am a string";
// Substitute:
replace(s, regex(" a "), " another ").writeln();
// Test.
if (!s.match(r"string$").empty)
"Ends with 'string'.".writeln;
// Substitute.
s.replace(" a ".regex, " another ").writeln;
}