Just another update

This commit is contained in:
Ingy döt Net 2015-02-20 00:35:01 -05:00
parent a25938f123
commit 00a190b0a6
6591 changed files with 94363 additions and 23227 deletions

View file

@ -1,16 +1,15 @@
import std.stdio, std.array, std.algorithm;
string[] multiSplit(in string s, in string[] divisors)
pure /*nothrow*/ {
string[] multiSplit(in string s, in string[] divisors) pure nothrow {
string[] result;
auto rest = s.idup; // Not nothrow.
auto rest = s.idup;
while (true) {
bool done = true;
string delim;
{
string best;
foreach (div; divisors) {
foreach (const div; divisors) {
const maybe = rest.find(div);
if (maybe.length > best.length) {
best = maybe;