If found, the index of the first occurrence, or the length of "str" otherwise.
test!("==")(StringSearch!().locatePatternT!("World")("Hello World!", 0), 6); test!("==")(StringSearch!().locatePatternT!("[")("[Hello]", 1), "[Hello]".length); // Crazy/inconsistent behavior: It should return 1 test!("==")(StringSearch!().locatePatternT!("[")("[", 1), 0); // Fail unittests, because reasons //test!("==")(StringSearch!().locatePattern("[", "[", 256), 0);
Scans "str" for "pattern" and returns the index of the first occurrence if found.