Skip to content

M_Cyjb_StringView_Insert

CYJB edited this page Mar 20, 2024 · 2 revisions

StringView.Insert 方法

返回一个新的字符串视图,在当前字符串视图中的指定索引位置插入指定的字符串。

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

语法

C#

public StringView Insert(
	int startIndex,
	string value
)

参数

 

startIndex
Type: System.Int32
要插入的索引。
value
Type: System.String
要插入的字符串。

返回值

Type: StringView
插入 value 后的新字符串视图。根据参数的不同可能会创建新的字符串。

Exceptions

 

异常 条件
ArgumentNullException valuenull
ArgumentOutOfRangeException startIndex 不表示当前字符串视图的有效位置。

参见

Reference

StringView 结构
Cyjb 命名空间

Clone this wiki locally