Skip to main content

CharIndex (character index)

CharIndex Function

Returns the index (position within the string, counting from the left) of the given character within the given string.

Syntax

Char (scalar searchText, scalar SourceString)

Arguments

ArgumentDescription
scalar searchTextCharacter(s) for which the index is to be returned
scalar SourceStringString containing the desired character

Examples:

CharIndex("n", "Have a nice day !")

Returns index of specified character in given source string.