Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


StartsWith

Checks if the StringView starts with the character c.
Read time 1 minuteLast updated 5 days ago

Definition

StartsWith(char, StringComparison)

Checks if the StringView starts with the character c.
public bool StartsWith(char c, StringComparison stringComparison = StringComparison.Ordinal)

Parameters

A character.

stringComparison

A string comparison option.

Returns

Type

Description

boolTrue if the StringView starts with c, otherwise false.

StartsWith(string, StringComparison)

Checks if the StringView starts with the string v.
public bool StartsWith(string v, StringComparison sc = StringComparison.Ordinal)

Parameters

A string.

A string comparison option.

Returns

Type

Description

boolTrue if the StringView starts with v, otherwise false.