Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


IndexOf

Searches the literal text for the search char. Does not search in nested placeholders.
Read time 1 minuteLast updated 12 days ago

Definition

IndexOf(char)

Searches the literal text for the search char. Does not search in nested placeholders.
public int IndexOf(char search)

Parameters

search

Character to locate.

Returns

Type

Description

intThe zero-based index of the first occurrence of the character in the literal text, or -1 if the character is not found.

IndexOf(char, int)

Searches the literal text for the search char. Does not search in nested placeholders.
public int IndexOf(char search, int start)

Parameters

search

Character to locate.

start

Index to start the search from.

Returns

Type

Description

intThe zero-based index of the first occurrence of the character in the literal text, or -1 if the character is not found.