C# · Searching and Counting

Searching and Counting

6.0.0-rc.1 · 91a27bdd

long position = Sz.IndexOf(haystack, needle);     // first match, or -1 (cf. MemoryExtensions.IndexOf)
long last = Sz.LastIndexOf(haystack, needle);
Byteset vowels = Byteset.FromBytes("aeiou"u8);
long anyVowel = Sz.IndexOfAny(haystack, ref vowels); // first byte in the set (cf. SearchValues<byte>)