Skip to content

M_Cyjb_StringView_Split_5

CYJB edited this page Mar 20, 2024 · 2 revisions

StringView.Split 方法 (String, Int32, StringSplitOptions)

使用指定的分隔符将字符串视图拆分为子字符串视图。

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

语法

C#

public StringView[] Split(
	string? separator,
	int count,
	StringSplitOptions options = StringSplitOptions.None
)

参数

 

separator
Type: System.String
分割字符的字符串。
count
Type: System.Int32
要返回的子字符串视图的最大数量。
options (Optional)
Type: System.StringSplitOptions
拆分字符串视图的选项。

返回值

Type: StringView[]
拆分后的子字符串视图。

Exceptions

 

异常 条件
ArgumentOutOfRangeException count 小于 0。

参见

Reference

StringView 结构
Split 重载
Cyjb 命名空间

Clone this wiki locally