import std.ascii: isDigit; assert(`aa1bb`.splitAfter!(a => a.isDigit) == tuple(`aa1`, `bb`)); assert(`aa1`.splitAfter!(a => a.isDigit) == tuple(`aa1`, ``));
See Implementation