Skip to content

M_Cyjb_StringView_EndsWith_2

CYJB edited this page Mar 20, 2024 · 2 revisions

StringView.EndsWith 方法 (ReadOnlySpan(Char), StringComparison)

返回当前字符串视图的结尾是否与指定的字符串匹配。

Namespace: Cyjb
Assembly: Cyjb (in Cyjb.dll) Version: 1.0.23+7750dd8e971297c5fa962a3bee37fb78f72793f6

语法

C#

public bool EndsWith(
	ReadOnlySpan<char> value,
	StringComparison comparisonType
)

参数

 

value
Type: System.ReadOnlySpan(Char)
要比较的字符串。
comparisonType
Type: System.StringComparison
比较中要使用的规则。

返回值

Type: Boolean
如果 value 与当前字符串视图的结尾匹配,则返回 true; 否则返回 false

Remarks

查找时使用区分大小写的当前区域性的比较。

参见

Reference

StringView 结构
EndsWith 重载
Cyjb 命名空间

Clone this wiki locally