An expression that matches all characters around which a split should occur.
The string to search for a code unit.
If a match is found, the index into the string is returned. Otherwise an invalid index is returned. Check with if (result < str.length).
// Check if there is a '/' or '\' in the string auto pos = str.find!(`or(=/,=\)`); if (pos < str.length) { }
split, The Generic SSE2 Loop
Finds the first occurrence of a set of compile-time known code units in a string. While the algorithm is O(n) in relation to the count of given code units, the overhead when using it on short strings weights more for only 1 or 2 code units.