Identifier.invalidIndex

Find the first forbidden char in an identifier, if any

Valid identifier are solely composed of [a-z][A-Z][0-9][._-] If any char isn't in that list, this function returns its index.

struct Identifier
static
size_t
invalidIndex

Parameters

str cstring

String to validate

Return Value

Type: size_t

The index at which the invalid char is, or str.length if there isn't any

Meta