FastCharSearch

Mixin used for fast searching for a character in string.

Creates a lookup table to quickly determine if a character is present in the string. Size of the lookup table is limited; any characters not represented in the table will be checked by ordinary equality comparison.

package
template FastCharSearch (
dstring chars
uint tableSize = 256
) {}

Parameters

tableSize

Maximum number of bytes used by the table.

Generated method: bool canFind(dchar c)

Determines if a character is in the string.

Meta