文档

Unity Engine

Unity Engine

StartsWith

Checks if the StringView starts with the character c.
阅读时间1 分钟最后更新于 1 个月前

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.