Same as the overload for strings, but with only a char*, making it faster as
it cannot do a boundary check.
Sometimes when looking for a character it is helpful to append it as a
sentinel to the char buffer and then use this function instead of the slower
one that checks the boundary constantly.
// Find a ']' in a buffer of 1024 bytes using an additional sentinel.size_tlength = 1024;
char[] buffer = newchar[](length+1);
buffer[length] = ']';
autopos = buffer.ptr.find!("=]");
if (pos < length) { // was an actual find before the sentinel }
Same as the overload for strings, but with only a char*, making it faster as it cannot do a boundary check.
Sometimes when looking for a character it is helpful to append it as a sentinel to the char buffer and then use this function instead of the slower one that checks the boundary constantly.