M_Cyjb_StringView_Replace_2 - CYJB/Cyjb GitHub Wiki
返回一个新的字符串视图,将当前字符串视图中的指定字符串替换为其它字符串。
Namespace: Cyjb
Assembly: Cyjb (in Cyjb.dll) Version: 1.0.23+7750dd8e971297c5fa962a3bee37fb78f72793f6
C#
public StringView Replace(
string oldValue,
string? newValue,
bool ignoreCase,
CultureInfo? culture
)
- oldValue
- Type: System.String
要替换的字符串。 - newValue
- Type: System.String
要替换到的字符串。 - ignoreCase
- Type: System.Boolean
比较时是否忽略大小写。 - culture
- Type: System.Globalization.CultureInfo
比较中要使用的区域性。如果为null
,则使用当前区域性。
Type: StringView
替换后的字符串视图。
异常 | 条件 |
---|---|
ArgumentNullException |
oldValue 为 null 。 |
ArgumentException | oldValue 为空字符串。 |