M_Cyjb_StringView_Split_3 - CYJB/Cyjb GitHub Wiki
使用指定的分隔符将字符串视图拆分为子字符串视图。
Namespace: Cyjb
Assembly: Cyjb (in Cyjb.dll) Version: 1.0.23+7750dd8e971297c5fa962a3bee37fb78f72793f6
C#
public StringView[] Split(
char[]? separator,
int count,
StringSplitOptions options = StringSplitOptions.None
)
- separator
- Type: System.Char[]
分割字符的字符数组。 - count
- Type: System.Int32
要返回的子字符串视图的最大数量。 - options (Optional)
- Type: System.StringSplitOptions
拆分字符串视图的选项。
Type: StringView[]
拆分后的子字符串视图。
异常 | 条件 |
---|---|
ArgumentOutOfRangeException | count 小于 0。 |