indexOf

Internal helper function to get the first index of a character in a string.

ptrdiff_t
indexOf
(
string s
,
char c
,
size_t offset = 0
)

Parameters

s string

The string to look in.

c char

The character to look for.

offset size_t

An optional offset to look from.

Return Value

Type: ptrdiff_t

The index of the character, or -1.