String kvp = " 4 : 30: ";
string [] vs = kvp.Split(new char[] { ':' }, StringSplitOptions.RemoveEmptyEntries);
string [] vss = kvp.Split(new char[] { ':' }, StringSplitOptions.None);
vs = [4,30];
vss = [4,30,];
String kvp1 = " 4 : 30: ";
string [] vs1 = kvp.Split(new char[] { ':' }, StringSplitOptions.RemoveEmptyEntries);
vs1 = [4,30, ];
//
// 摘要:
// 返回的字符串数组包含此字符串中的子字符串(由指定 Unicode 字符数组的元素分隔)。参数指定是否返回空数组元素。
//
// 参数:
// separator:
// 分隔此字符串中子字符串的 Unicode 字符数组、不包含分隔符的空数组或 null。
//
// options:
// 要省略返回的数组中的空数组元素,则为 System.StringSplitOptions.RemoveEmptyEntries;要包含返回的数组中的空数组元素,则为
// System.StringSplitOptions.None。
//
// 返回结果:
// 一个数组,其元素包含此字符串中的子字符串,这些子字符串由 separator 中的一个或多个字符分隔。有关更多信息,请参见“备注”部分。
//
// 异常:
// T:System.ArgumentException:
// options 不是 System.StringSplitOptions 值之一。
[ComVisible(false)]
public String[] Split(char[] separator, StringSplitOptions options);
#region 程序集 mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
// C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile\Client\mscorlib.dll
#endregion
using System.Collections;
using System.Collections.Generic;
using System.Globalization;
using System.Reflection;
using System.Runtime;
using System.Runtime.ConstrainedExecution;
using System.Runtime.InteropServices;
using System.Security;
using System.Text;
namespace System
{
//
// 摘要:
// 表示文本,即一系列 Unicode 字符。
[ComVisible(true)]
[DefaultMember("Chars")]
public sealed class String : IComparable, ICloneable, IConvertible, IComparable<String>, IEnumerable<char>, IEnumerable, IEquatable<String>
{
//
// 摘要:
// 表示空字符串。此字段为只读。
public static readonly String Empty;
//
// 摘要:
// 将 System.String 类的新实例初始化为由 Unicode 字符数组指示的值。
//
// 参数:
// value:
// Unicode 字符的数组。
[SecuritySafeCritical]
public String(char[] value);
//
// 摘要:
// 将 System.String 类的新实例初始化为由指向 8 位有符号整数数组的指针指示的值。
//
// 参数:
// value:
// 一个指针,指向以 null 结尾的 8 位有符号整数数组。
//
// 异常:
// T:System.ArgumentNullException:
// value 为 null。
//
// T:System.ArgumentException:
// value 的编码似乎是 ANSI,因而未能使用 value 初始化 System.String 的新实例。
//
// T:System.ArgumentOutOfRangeException:
// 要初始化的新字符串的长度过大,无法分配,该长度由 value 的 null 终止字符决定。
//
// T:System.AccessViolationException:
// value 指定的地址无效。
[CLSCompliant(false)]
[SecurityCritical]
public String(sbyte* value);
//
// 摘要:
// 将 System.String 类的新实例初始化为由指向 Unicode 字符数组的指定指针指示的值。
//
// 参数:
// value:
// 指向以 null 终止的 Unicode 字符数组的指针。
//
// 异常:
// T:System.ArgumentOutOfRangeException:
// 当前进程并不是对所有编址字符都有读取权限。
//
// T:System.ArgumentNullException:
// value 为 null。
//
// T:System.ArgumentException:
// value 指定了包含无效 Unicode 字符的数组,或者 value 指定了小于 64000 的地址。
[CLSCompliant(false)]
[SecurityCritical]
public String(char* value);
//
// 摘要:
// 将 System.String 类的新实例初始化为由重复指定次数的指定 Unicode 字符指示的值。
//
// 参数:
// c:
// 一个 Unicode 字符。
//
// count:
// c 出现的次数。
//
// 异常:
// T:System.ArgumentOutOfRangeException:
// count 小于零。
[SecuritySafeCritical]
public String(char c, int count);
//
// 摘要:
// 将 System.String 类的新实例初始化为由 Unicode 字符数组、该数组内的起始字符位置和一个长度指示的值。
//
// 参数:
// value:
// Unicode 字符的数组。
//
// startIndex:
// value 内的起始位置。
//
// length:
// 要使用的 value 内的字符数。
//
// 异常:
// T:System.ArgumentNullException:
// value 为 null。
//
// T:System.ArgumentOutOfRangeException:
// startIndex 或 length 小于零。- 或 -startIndex 和 length 之和大于 value 中的元素数。
[SecuritySafeCritical]
public String(char[] value, int startIndex, int length);
//
// 摘要:
// 将 System.String 类的新实例初始化为由指向 8 位有符号整数数组的指定指针、该数组内的起始字符位置和一个长度指示的值。
//
// 参数:
// value:
// 指向 8 位有符号整数数组的指针。
//
// startIndex:
// value 内的起始位置。
//
// length:
// 要使用的 value 内的字符数。
//
// 异常:
// T:System.ArgumentNullException:
// value 为 null。
//
// T:System.ArgumentOutOfRangeException:
// startIndex 或 length 小于零。- 或 -由 value + startIndex 指定的地址相对于当前平台来说太大;即,地址计算溢出。-
// 或 -要初始化的新字符串的长度太大,无法分配。
//
// T:System.ArgumentException:
// 由 value + startIndex 指定的地址小于 64K。- 或 -value 的编码似乎为 ANSI,因而未能使用 value 初始化 System.String
// 的新实例。
//
// T:System.AccessViolationException:
// value、startIndex 和 length 共同指定的地址无效。
[CLSCompliant(false)]
[SecurityCritical]
public String(sbyte* value, int startIndex, int length);
//
// 摘要:
// 将 System.String 类的新实例初始化为由指向 Unicode 字符数组的指定指针、该数组内的起始字符位置和一个长度指示的值。
//
// 参数:
// value:
// 指向 Unicode 字符数组的指针。
//
// startIndex:
// value 内的起始位置。
//
// length:
// 要使用的 value 内的字符数。
//
// 异常:
// T:System.ArgumentOutOfRangeException:
// startIndex 或 length 小于零,value + startIndex 引起指针溢出,或者当前进程并不是对所有编址字符都有读取权限。
//
// T:System.ArgumentNullException:
// value 为 null。
//
// T:System.ArgumentException:
// value 指定了包含无效 Unicode 字符的数组,或者 value + startIndex 指定了小于 64000 的地址。
[CLSCompliant(false)]
[SecurityCritical]
public String(char* value, int startIndex, int length);
//
// 摘要:
// 将 System.String 类的新实例初始化为由指向 8 位有符号整数数组的指定指针、该数组内的起始字符位置、长度以及 System.Text.Encoding
// 对象指示的值。
//
// 参数:
// value:
// 指向 8 位有符号整数数组的指针。
//
// startIndex:
// value 内的起始位置。
//
// length:
// 要使用的 value 内的字符数。
//
// enc:
// 一个对象,用于指定如何对 value 所引用的数组进行编码。如果 enc 为 null,则假定以 ANSI 编码。
//
// 异常:
// T:System.ArgumentNullException:
// value 为 null。
//
// T:System.ArgumentOutOfRangeException:
// startIndex 或 length 小于零。- 或 -由 value + startIndex 指定的地址相对于当前平台来说太大;即,地址计算溢出。-
// 或 -要初始化的新字符串的长度太大,无法分配。
//
// T:System.ArgumentException:
// 由 value + startIndex 指定的地址小于 64K。- 或 -value 的编码似乎是按照 enc 的指定进行的,因而未能使用 value
// 初始化 System.String 的新实例。
//
// T:System.AccessViolationException:
// value、startIndex 和 length 共同指定的地址无效。
[CLSCompliant(false)]
[SecurityCritical]
public String(sbyte* value, int startIndex, int length, Encoding enc);
//
// 摘要:
// 获取当前 System.String 对象中位于指定字符位置的字符。
//
// 参数:
// index:
// 当前字符串中的字符位置。
//
// 返回结果:
// 一个 Unicode 字符。
//
// 异常:
// T:System.IndexOutOfRangeException:
// index 大于等于该对象的长度或小于零。
public char this[int index] { get; }
//
// 摘要:
// 获取当前 System.String 对象中的字符数。
//
// 返回结果:
// 当前字符串中字符的数量。
public int Length { get; }
//
// 摘要:
// 比较两个指定的 System.String 对象,并返回一个整数,指示二者在排序顺序中的相对位置。
//
// 参数:
// strA:
// 要比较的第一个字符串。
//
// strB:
// 要比较的第二个字符串。
//
// 返回结果:
// 一个 32 位带符号整数,指示两个比较数之间的词法关系。值条件小于零strA 小于 strB。零strA 等于 strB。大于零strA 大于 strB。
[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
public static int Compare(String strA, String strB);
//
// 摘要:
// 使用指定的规则比较两个指定的 System.String 对象,并返回一个整数,指示二者在排序顺序中的相对位置。
//
// 参数:
// strA:
// 要比较的第一个字符串。
//
// strB:
// 要比较的第二个字符串。
//
// comparisonType:
// 一个枚举值,用于指定比较中要使用的规则。
//
// 返回结果:
// 一个 32 位带符号整数,指示两个比较数之间的词法关系。值条件小于零strA 小于 strB。零strA 等于 strB。大于零strA 大于 strB。
//
// 异常:
// T:System.ArgumentException:
// comparisonType 不是一个 System.StringComparison 值。
//
// T:System.NotSupportedException:
// 不支持 System.StringComparison。
[SecuritySafeCritical]
public static int Compare(String strA, String strB, StringComparison comparisonType);
//
// 摘要:
// 比较两个指定的 System.String 对象(其中忽略或考虑其大小写),并返回一个整数,指示二者在排序顺序中的相对位置。
//
// 参数:
// strA:
// 要比较的第一个字符串。
//
// strB:
// 要比较的第二个字符串。
//
// ignoreCase:
// 要在比较过程中忽略大小写,则为 true;否则为 false。
//
// 返回结果:
// 一个 32 位带符号整数,指示两个比较数之间的词法关系。值条件小于零strA 小于 strB。零strA 等于 strB。大于零strA 大于 strB。
[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
public static int Compare(String strA, String strB, bool ignoreCase);
//
// 摘要:
// 比较两个指定的 System.String 对象(其中忽略或考虑其大小写,并使用区域性特定的信息干预比较),并返回一个整数,指示二者在排序顺序中的相对位置。
//
// 参数:
// strA:
// 要比较的第一个字符串。
//
// strB:
// 要比较的第二个字符串。
//
// ignoreCase:
// 要在比较过程中忽略大小写,则为 true;否则为 false。
//
// culture:
// 一个对象,提供区域性特定的比较信息。
//
// 返回结果:
// 一个 32 位带符号整数,指示两个比较数之间的词法关系。值条件小于零strA 小于 strB。零strA 等于 strB。大于零strA 大于 strB。
//
// 异常:
// T:System.ArgumentNullException:
// culture 为 null。
[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
public static int Compare(String strA, String strB, bool ignoreCase, CultureInfo culture);
//
// 摘要:
// 对两个指定的 System.String 对象进行比较,使用指定的比较选项和区域性特定的信息来影响比较,并返回一个整数,该整数指示这两个字符串在排序顺序中的关系。
//
// 参数:
// strA:
// 要比较的第一个字符串。
//
// strB:
// 要比较的第二个字符串。
//
// culture:
// 提供区域性特定的比较信息的区域性。
//
// options:
// 要在执行比较时使用的选项(如忽略大小写或符号)。
//
// 返回结果:
// 一个 32 位有符号整数,该整数指示 strA 与 strB 之间的词法关系,如下表所示值条件小于零strA 小于 strB。零strA 等于 strB。大于零strA
// 大于 strB。
//
// 异常:
// T:System.ArgumentException:
// options 不是一个 System.Globalization.CompareOptions 值。
//
// T:System.ArgumentNullException:
// culture 为 null。
[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
public static int Compare(String strA, String strB, CultureInfo culture, CompareOptions options);
//
// 摘要:
// 对两个指定的 System.String 对象的子字符串进行比较,并返回一个指示二者在排序顺序中的相对位置的整数。
//
// 参数:
// strA:
// 要在比较中使用的第一个字符串。
//
// indexA:
// strA 中子字符串的位置。
//
// strB:
// 要在比较中使用的第二个字符串。
//
// indexB:
// strB 中子字符串的位置。
//
// length:
// 要比较的子字符串中字符的最大数量。
//
// 返回结果:
// 一个 32 位有符号整数,指示两个比较数之间的词法关系。值条件小于零strA 中的子字符串小于 strB 中的子字符串。零子字符串相等,或者 length
// 为零。大于零strA 中的子字符串大于 strB 中的子字符串。
//
// 异常:
// T:System.ArgumentOutOfRangeException:
// indexA 大于 strA.System.String.Length。- 或 -indexB 大于 strB.System.String.Length。-
// 或 -indexA、indexB 或 length 为负。- 或 -indexA 或 indexB 为 null,而 length 大于零。
public static int Compare(String strA, int indexA, String strB, int indexB, int length);
//
// 摘要:
// 比较两个指定的 System.String 对象的子字符串(忽略或考虑其大小写),并返回一个整数,指示二者在排序顺序中的相对位置。
//
// 参数:
// strA:
// 要在比较中使用的第一个字符串。
//
// indexA:
// strA 中子字符串的位置。
//
// strB:
// 要在比较中使用的第二个字符串。
//
// indexB:
// strB 中子字符串的位置。
//
// length:
// 要比较的子字符串中字符的最大数量。
//
// ignoreCase:
// 要在比较过程中忽略大小写,则为 true;否则为 false。
//
// 返回结果:
// 一个 32 位带符号整数,指示两个比较数之间的词法关系。值条件小于零strA 中的子字符串小于 strB 中的子字符串。零子字符串相等,或者 length
// 为零。大于零strA 中的子字符串大于 strB 中的子字符串。
//
// 异常:
// T:System.ArgumentOutOfRangeException:
// indexA 大于 strA.System.String.Length。- 或 -indexB 大于 strB.System.String.Length。-
// 或 -indexA、indexB 或 length 为负。- 或 -indexA 或 indexB 为 null,而 length 大于零。
public static int Compare(String strA, int indexA, String strB, int indexB, int length, bool ignoreCase);
//
// 摘要:
// 使用指定的规则比较两个指定的 System.String 对象的子字符串,并返回一个整数,指示二者在排序顺序中的相对位置。
//
// 参数:
// strA:
// 要在比较中使用的第一个字符串。
//
// indexA:
// strA 中子字符串的位置。
//
// strB:
// 要在比较中使用的第二个字符串。
//
// indexB:
// strB 中子字符串的位置。
//
// length:
// 要比较的子字符串中字符的最大数量。
//
// comparisonType:
// 一个枚举值,用于指定比较中要使用的规则。
//
// 返回结果:
// 一个 32 位带符号整数,指示两个比较数之间的词法关系。值条件小于零strA 参数中的子字符串小于 strB 参数中的子字符串。零子字符串相等,或者 length
// 参数为零。大于零strA 中的子字符串大于 strB 中的子字符串。
//
// 异常:
// T:System.ArgumentOutOfRangeException:
// indexA 大于 strA.System.String.Length。- 或 -indexB 大于 strB.System.String.Length。-
// 或 -indexA、indexB 或 length 为负。- 或 -indexA 或 indexB 为 null,而 length 大于零。
//
// T:System.ArgumentException:
// comparisonType 不是一个 System.StringComparison 值。
[SecuritySafeCritical]
public static int Compare(String strA, int indexA, String strB, int indexB, int length, StringComparison comparisonType);
//
// 摘要:
// 比较两个指定的 System.String 对象的子字符串(其中忽略或考虑其大小写,并使用区域性特定的信息干预比较),并返回一个整数,指示二者在排序顺序中的相对位置。
//
// 参数:
// strA:
// 要在比较中使用的第一个字符串。
//
// indexA:
// strA 中子字符串的位置。
//
// strB:
// 要在比较中使用的第二个字符串。
//
// indexB:
// strB 中子字符串的位置。
//
// length:
// 要比较的子字符串中字符的最大数量。
//
// ignoreCase:
// 要在比较过程中忽略大小写,则为 true;否则为 false。
//
// culture:
// 一个对象,提供区域性特定的比较信息。
//
// 返回结果:
// 一个整数,指示两个比较字之间的词法关系。值条件小于零strA 中的子字符串小于 strB 中的子字符串。零子字符串相等,或者 length 为零。大于零strA
// 中的子字符串大于 strB 中的子字符串。
//
// 异常:
// T:System.ArgumentOutOfRangeException:
// indexA 大于 strA.System.String.Length。- 或 -indexB 大于 strB.System.String.Length。-
// 或 -indexA、indexB 或 length 为负。- 或 -strA 或 strB 为 null,而 length 大于零。
//
// T:System.ArgumentNullException:
// culture 为 null。
public static int Compare(String strA, int indexA, String strB, int indexB, int length, bool ignoreCase, CultureInfo culture);
//
// 摘要:
// 对两个指定 System.String 对象的子字符串进行比较,使用指定的比较选项和区域性特定的信息来影响比较,并返回一个整数,该整数指示这两个子字符串在排序顺序中的关系。
//
// 参数:
// strA:
// 要在比较中使用的第一个字符串。
//
// indexA:
// strA 中子字符串的起始位置。
//
// strB:
// 要在比较中使用的第二个字符串。
//
// indexB:
// strB 中子字符串的起始位置。
//
// length:
// 要比较的子字符串中字符的最大数量。
//
// culture:
// 一个对象,提供区域性特定的比较信息。
//
// options:
// 要在执行比较时使用的选项(如忽略大小写或符号)。
//
// 返回结果:
// 一个整数,该整数用于指示两个子字符串之间的词法关系,如下表所示。值条件小于零strA 中的子字符串小于 strB 中的子字符串。零两个子字符串相等或者 length
// 为零。大于零strA 中的子字符串大于 strB 中的子字符串。
//
// 异常:
// T:System.ArgumentException:
// options 不是一个 System.Globalization.CompareOptions 值。
//
// T:System.ArgumentOutOfRangeException:
// indexA 大于 strA.Length。- 或 -indexB 大于 strB.Length。- 或 -indexA、indexB 或 length
// 为负。- 或 -strA 或 strB 为 null,而 length 大于零。
//
// T:System.ArgumentNullException:
// culture 为 null。
public static int Compare(String strA, int indexA, String strB, int indexB, int length, CultureInfo culture, CompareOptions options);
//
// 摘要:
// 通过计算每个字符串中相应 System.Char 对象的数值来比较两个指定的 System.String 对象。
//
// 参数:
// strA:
// 要比较的第一个字符串。
//
// strB:
// 要比较的第二个字符串。
//
// 返回结果:
// 一个整数,指示两个比较字之间的词法关系。值条件小于零strA 小于 strB。零strA 与 strB 相等。大于零strA 大于 strB。
[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
public static int CompareOrdinal(String strA, String strB);
//
// 摘要:
// 通过计算两个指定的 System.String 对象的每个子字符串中相应 System.Char 对象的数值比较子字符串。
//
// 参数:
// strA:
// 要在比较中使用的第一个字符串。
//
// indexA:
// strA 中子字符串的起始索引。
//
// strB:
// 要在比较中使用的第二个字符串。
//
// indexB:
// strB 中子字符串的起始索引。
//
// length:
// 要比较的子字符串中字符的最大数量。
//
// 返回结果:
// 一个 32 位带符号整数,指示两个比较数之间的词法关系。值条件小于零strA 中的子字符串小于 strB 中的子字符串。零子字符串相等,或者 length
// 为零。大于零strA 中的子字符串大于 strB 中的子字符串。
//
// 异常:
// T:System.ArgumentOutOfRangeException:
// indexA 大于 strA。System.String.Length.- 或 -indexB 大于 strB。System.String.Length.-
// 或 -indexA、indexB 或 length 为负。
[SecuritySafeCritical]
[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
public static int CompareOrdinal(String strA, int indexA, String strB, int indexB, int length);
//
// 摘要:
// 创建指定对象的 System.String 表示形式。
//
// 参数:
// arg0:
// 要表示的对象,或 null。
//
// 返回结果:
// arg0 的值的字符串表示形式。
public static String Concat(object arg0);
//
// 摘要:
// 串联类型为 System.String 的 System.Collections.Generic.IEnumerable`1 构造集合的成员。
//
// 参数:
// values:
// 一个集合对象,该对象实现 System.Collections.Generic.IEnumerable`1,且其泛型类型参数为 System.String。
//
// 返回结果:
// values 中的串联字符串。
//
// 异常:
// T:System.ArgumentNullException:
// values 为 null。
[ComVisible(false)]
public static String Concat(IEnumerable<String> values);
//
// 摘要:
// 连接指定的 System.String 数组的元素。
//
// 参数:
// values:
// 字符串实例的数组。
//
// 返回结果:
// values 的连接元素。
//
// 异常:
// T:System.ArgumentNullException:
// values 为 null。
//
// T:System.OutOfMemoryException:
// 内存不足。
public static String Concat(params String[] values);
//
// 摘要:
// 连接指定 System.Object 数组中的元素的 System.String 表示形式。
//
// 参数:
// args:
// 一个对象数组,其中包含要连接的元素。
//
// 返回结果:
// args 中元素的值经过连接的字符串表示形式。
//
// 异常:
// T:System.ArgumentNullException:
// args 为 null。
//
// T:System.OutOfMemoryException:
// 内存不足。
public static String Concat(params object[] args);
//
// 摘要:
// 连接 System.String 的两个指定实例。
//
// 参数:
// str0:
// 要连接的第一个字符串。
//
// str1:
// 要连接的第二个字符串。
//
// 返回结果:
// str0 和 str1 的连接。
[SecuritySafeCritical]
public static String Concat(String str0, String str1);
//
// 摘要:
// 连接两个指定对象的字符串表示形式。
//
// 参数:
// arg0:
// 要连接的第一个对象。
//
// arg1:
// 要连接的第二个对象。
//
// 返回结果:
// arg0 和 arg1 的值经过连接的字符串表示形式。
public static String Concat(object arg0, object arg1);
//
// 摘要:
// 连接 System.String 的三个指定实例。
//
// 参数:
// str0:
// 要连接的第一个字符串。
//
// str1:
// 要连接的第二个字符串。
//
// str2:
// 要连接的第三个字符串。
//
// 返回结果:
// str0、str1 和 str2 的连接。
[SecuritySafeCritical]
public static String Concat(String str0, String str1, String str2);
//
// 摘要:
// 连接三个指定对象的字符串表示形式。
//
// 参数:
// arg0:
// 要连接的第一个对象。
//
// arg1:
// 要连接的第二个对象。
//
// arg2:
// 要连接的第三个对象。
//
// 返回结果:
// arg0、arg1 和 arg2 的值经过连接的字符串表示形式。
public static String Concat(object arg0, object arg1, object arg2);
//
// 摘要:
// 连接 System.String 的四个指定实例。
//
// 参数:
// str0:
// 要连接的第一个字符串。
//
// str1:
// 要连接的第二个字符串。
//
// str2:
// 要连接的第三个字符串。
//
// str3:
// 要连接的第四个字符串。
//
// 返回结果:
// str0、str1、str2 和 str3 的连接。
[SecuritySafeCritical]
public static String Concat(String str0, String str1, String str2, String str3);
[CLSCompliant(false)]
[SecuritySafeCritical]
public static String Concat(object arg0, object arg1, object arg2, object arg3);
//
// 摘要:
// 串联 System.Collections.Generic.IEnumerable`1 实现的成员。
//
// 参数:
// values:
// 一个实现 System.Collections.Generic.IEnumerable`1 接口的集合对象。
//
// 类型参数:
// T:
// values 成员的类型。
//
// 返回结果:
// values 中的串联成员。
//
// 异常:
// T:System.ArgumentNullException:
// values 为 null。
[ComVisible(false)]
public static String Concat<T>(IEnumerable<T> values);
//
// 摘要:
// 创建一个与指定的 System.String 具有相同值的 System.String 的新实例。
//
// 参数:
// str:
// 要复制的字符串。
//
// 返回结果:
// 值与 str 相同的新字符串。
//
// 异常:
// T:System.ArgumentNullException:
// str 为 null。
[SecuritySafeCritical]
public static String Copy(String str);
//
// 摘要:
// 确定两个指定的 System.String 对象是否具有相同的值。
//
// 参数:
// a:
// 要比较的第一个字符串,或 null。
//
// b:
// 要比较的第二个字符串,或 null。
//
// 返回结果:
// 如果 a 的值与 b 的值相同,则为 true;否则为 false。
[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
public static bool Equals(String a, String b);
//
// 摘要:
// 确定两个指定的 T:System.String 对象是否具有相同的值。参数指定区域性、大小写以及比较所用的排序规则。
//
// 参数:
// a:
// 要比较的第一个字符串,或 null。
//
// b:
// 要比较的第二个字符串,或 null。
//
// comparisonType:
// 枚举值之一,用于指定比较的规则。
//
// 返回结果:
// 如果 a 参数的值等于 b 参数的值,则为 true;否则为 false。
//
// 异常:
// T:System.ArgumentException:
// comparisonType 不是一个 System.StringComparison 值。
[SecuritySafeCritical]
public static bool Equals(String a, String b, StringComparison comparisonType);
//
// 摘要:
// 将指定字符串中的格式项替换为指定数组中相应对象的字符串表示形式。
//
// 参数:
// format:
// 复合格式字符串。
//
// args:
// 一个对象数组,其中包含零个或多个要设置格式的对象。
//
// 返回结果:
// format 的副本,其中的格式项已替换为 args 中相应对象的字符串表示形式。
//
// 异常:
// T:System.ArgumentNullException:
// format 或 args 为 null。
//
// T:System.FormatException:
// format 无效。- 或 -格式项的索引小于零或大于等于 args 数组的长度。
public static String Format(String format, params object[] args);
//
// 摘要:
// 将指定字符串中的一个或多个格式项替换为指定对象的字符串表示形式。
//
// 参数:
// format:
// 复合格式字符串。
//
// arg0:
// 要设置格式的对象。
//
// 返回结果:
// format 的副本,其中的任何格式项均替换为 arg0 的字符串表示形式。
//
// 异常:
// T:System.ArgumentNullException:
// format 为 null。
//
// T:System.FormatException:
// format 中的格式项无效。- 或 -格式项的索引大于或小于零。
public static String Format(String format, object arg0);
//
// 摘要:
// 将指定字符串中的格式项替换为指定数组中相应对象的字符串表示形式。指定的参数提供区域性特定的格式设置信息。
//
// 参数:
// provider:
// 一个提供区域性特定的格式设置信息的对象。
//
// format:
// 复合格式字符串。
//
// args:
// 一个对象数组,其中包含零个或多个要设置格式的对象。
//
// 返回结果:
// format 的副本,其中的格式项已替换为 args 中相应对象的字符串表示形式。
//
// 异常:
// T:System.ArgumentNullException:
// format 或 args 为 null。
//
// T:System.FormatException:
// format 无效。- 或 -格式项的索引小于零或大于等于 args 数组的长度。
[SecuritySafeCritical]
public static String Format(IFormatProvider provider, String format, params object[] args);
//
// 摘要:
// 将指定字符串中的格式项替换为两个指定对象的字符串表示形式。
//
// 参数:
// format:
// 复合格式字符串。
//
// arg0:
// 要设置格式的第一个对象。
//
// arg1:
// 要设置格式的第二个对象。
//
// 返回结果:
// format 的副本,其中的格式项替换为 arg0 和 arg1 的字符串表示形式。
//
// 异常:
// T:System.ArgumentNullException:
// format 为 null。
//
// T:System.FormatException:
// format 无效。- 或 -格式项的索引小于零或大于一。
public static String Format(String format, object arg0, object arg1);
//
// 摘要:
// 将指定字符串中的格式项替换为三个指定对象的字符串表示形式。
//
// 参数:
// format:
// 复合格式字符串。
//
// arg0:
// 要设置格式的第一个对象。
//
// arg1:
// 要设置格式的第二个对象。
//
// arg2:
// 要设置格式的第三个对象。
//
// 返回结果:
// format 的副本,其中的格式项已替换为 arg0、arg1 和 arg2 的字符串表示形式。
//
// 异常:
// T:System.ArgumentNullException:
// format 为 null。
//
// T:System.FormatException:
// format 无效。- 或 -格式项的索引小于零或大于二。
public static String Format(String format, object arg0, object arg1, object arg2);
//
// 摘要:
// 检索系统对指定 System.String 的引用。
//
// 参数:
// str:
// 要在暂存池中搜索的字符串。
//
// 返回结果:
// 如果暂存了 str,则返回系统对其的引用;否则返回对值为 str 的字符串的新引用。
//
// 异常:
// T:System.ArgumentNullException:
// str 为 null。
[SecuritySafeCritical]
[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
public static String Intern(String str);
//
// 摘要:
// 检索对指定 System.String 的引用。
//
// 参数:
// str:
// 要在暂存池中搜索的字符串。
//
// 返回结果:
// 如果 str 在公共语言运行时的暂存池中,则返回对它的引用;否则返回 null。
//
// 异常:
// T:System.ArgumentNullException:
// str 为 null。
[SecuritySafeCritical]
public static String IsInterned(String str);
//
// 摘要:
// 指示指定的字符串是 null 还是 System.String.Empty 字符串。
//
// 参数:
// value:
// 要测试的字符串。
//
// 返回结果:
// 如果 value 参数为 null 或空字符串 (""),则为 true;否则为 false。
[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
public static bool IsNullOrEmpty(String value);
//
// 摘要:
// 指示指定的字符串是 null、空还是仅由空白字符组成。
//
// 参数:
// value:
// 要测试的字符串。
//
// 返回结果:
// 如果 value 参数为 null 或 System.String.Empty,或者如果 value 仅由空白字符组成,则为 true。
public static bool IsNullOrWhiteSpace(String value);
//
// 摘要:
// 串联字符串数组的所有元素,其中在每个元素之间使用指定的分隔符。
//
// 参数:
// separator:
// 要用作分隔符的字符串。
//
// value:
// 一个数组,其中包含要连接的元素。
//
// 返回结果:
// 一个由 value 中的元素组成的字符串,这些元素以 separator 字符串分隔。
//
// 异常:
// T:System.ArgumentNullException:
// value 为 null。
public static String Join(String separator, params String[] value);
//
// 摘要:
// 串联类型为 System.String 的 System.Collections.Generic.IEnumerable`1 构造集合的成员,其中在每个成员之间使用指定的分隔符。
//
// 参数:
// separator:
// 要用作分隔符的字符串。
//
// values:
// 一个包含要串联的字符串的集合。
//
// 返回结果:
// 一个由 values 的成员组成的字符串,这些成员以 separator 字符串分隔。
//
// 异常:
// T:System.ArgumentNullException:
// values 为 null。
[ComVisible(false)]
public static String Join(String separator, IEnumerable<String> values);
//
// 摘要:
// 串联对象数组的各个元素,其中在每个元素之间使用指定的分隔符。
//
// 参数:
// separator:
// 要用作分隔符的字符串。
//
// values:
// 一个数组,其中包含要连接的元素。
//
// 返回结果:
// 一个由 values 的元素组成的字符串,这些元素以 separator 字符串分隔。
//
// 异常:
// T:System.ArgumentNullException:
// values 为 null。
[ComVisible(false)]
public static String Join(String separator, params object[] values);
//
// 摘要:
// 串联字符串数组的指定元素,其中在每个元素之间使用指定的分隔符。
//
// 参数:
// separator:
// 要用作分隔符的字符串。
//
// value:
// 一个数组,其中包含要连接的元素。
//
// startIndex:
// value 中要使用的第一个元素。
//
// count:
// 要使用的 value 的元素数。
//
// 返回结果:
// 由 value 中的字符串组成的字符串,这些字符串以 separator 字符串分隔。- 或 -如果 count 为零,value 没有元素,或 separator
// 以及 value 的全部元素均为 System.String.Empty,则为 System.String.Empty。
//
// 异常:
// T:System.ArgumentNullException:
// value 为 null。
//
// T:System.ArgumentOutOfRangeException:
// startIndex 或 count 小于 0。- 或 -startIndex 加上 count 大于 value 中的元素数。
//
// T:System.OutOfMemoryException:
// 内存不足。
[SecuritySafeCritical]
public static String Join(String separator, String[] value, int startIndex, int count);
//
// 摘要:
// 串联字符串集合的成员,其中在每个成员之间使用指定的分隔符。
//
// 参数:
// separator:
// 要用作分隔符的字符串。
//
// values:
// 一个包含要串联的对象的集合。
//
// 类型参数:
// T:
// values 成员的类型。
//
// 返回结果:
// 一个由 values 的成员组成的字符串,这些成员以 separator 字符串分隔。
//
// 异常:
// T:System.ArgumentNullException:
// values 为 null。
[ComVisible(false)]
public static String Join<T>(String separator, IEnumerable<T> values);
//
// 摘要:
// 返回对此 System.String 实例的引用。
//
// 返回结果:
// 此 System.String 实例。
public object Clone();
//
// 摘要:
// 将此实例与指定的 System.Object 进行比较,并指示此实例在排序顺序中是位于指定的 System.Object 之前、之后还是与其出现在同一位置。
//
// 参数:
// value:
// 一个对象,其计算结果为 System.String。
//
// 返回结果:
// 一个 32 位有符号整数,该整数指示此实例在排序顺序中是位于 value 参数之前、之后还是与其出现在同一位置。值条件小于零此实例位于 value 之前。零此实例在排序顺序中的位置与
// value 相同。大于零此实例位于 value 之后。- 或 -value 为 null。
//
// 异常:
// T:System.ArgumentException:
// value 不是 System.String。
[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
public int CompareTo(object value);
//
// 摘要:
// 将此实例与指定的 System.String 对象进行比较,并指示此实例在排序顺序中是位于指定的 System.String 之前、之后还是与其出现在同一位置。
//
// 参数:
// strB:
// 要与此实例进行比较的字符串。
//
// 返回结果:
// 一个 32 位有符号整数,该整数指示此实例在排序顺序中是位于 value 参数之前、之后还是与其出现在同一位置。值条件小于零此实例位于 strB 之前。零此实例在排序顺序中的位置与
// strB 相同。大于零此实例位于 strB 之后。- 或 -strB 为 null。
[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
public int CompareTo(String strB);
//
// 摘要:
// 返回一个值,该值指示指定的 System.String 对象是否出现在此字符串中。
//
// 参数:
// value:
// 要搜寻的字符串。
//
// 返回结果:
// 如果 value 参数出现在此字符串中,或者 value 为空字符串 (""),则为 true;否则为 false。
//
// 异常:
// T:System.ArgumentNullException:
// value 为 null。
[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
public bool Contains(String value);
//
// 摘要:
// 将指定数目的字符从此实例中的指定位置复制到 Unicode 字符数组中的指定位置。
//
// 参数:
// sourceIndex:
// 要复制的此实例中第一个字符的索引。
//
// destination:
// 此实例中的字符所复制到的 Unicode 字符数组。
//
// destinationIndex:
// destination 中的索引,在此处开始复制操作。
//
// count:
// 此实例中要复制到 destination 的字符数。
//
// 异常:
// T:System.ArgumentNullException:
// destination 为 null。
//
// T:System.ArgumentOutOfRangeException:
// sourceIndex、destinationIndex 或 count 为负- 或 -count 大于从 startIndex 到此实例末尾的子字符串的长度-
// 或 -count 大于从 destinationIndex 到 destination 末尾的子数组的长度
[SecuritySafeCritical]
public void CopyTo(int sourceIndex, char[] destination, int destinationIndex, int count);
//
// 摘要:
// 确定此字符串实例的结尾是否与指定的字符串匹配。
//
// 参数:
// value:
// 要与此实例末尾的子字符串进行比较的字符串。
//
// 返回结果:
// 如果 value 与此实例的末尾匹配,则为 true;否则为 false。
//
// 异常:
// T:System.ArgumentNullException:
// value 为 null。
public bool EndsWith(String value);
//
// 摘要:
// 确定使用指定的比较选项进行比较时此字符串实例的结尾是否与指定的字符串匹配。
//
// 参数:
// value:
// 要与此实例末尾的子字符串进行比较的字符串。
//
// comparisonType:
// 枚举值之一,用于确定如何比较此字符串与 value。
//
// 返回结果:
// 如果此字符串的末尾与 value 参数匹配,则为 true;否则为 false。
//
// 异常:
// T:System.ArgumentNullException:
// value 为 null。
//
// T:System.ArgumentException:
// comparisonType 不是一个 System.StringComparison 值。
[ComVisible(false)]
[SecuritySafeCritical]
public bool EndsWith(String value, StringComparison comparisonType);
//
// 摘要:
// 确定在使用指定的区域性进行比较时此字符串实例的结尾是否与指定的字符串匹配。
//
// 参数:
// value:
// 要与此实例末尾的子字符串进行比较的字符串。
//
// ignoreCase:
// 要在比较过程中忽略大小写,则为 true;否则为 false。
//
// culture:
// 确定如何对此实例与 value 进行比较的区域性信息。如果 culture 为 null,则使用当前区域性。
//
// 返回结果:
// 如果此字符串的末尾与 value 参数匹配,则为 true;否则为 false。
//
// 异常:
// T:System.ArgumentNullException:
// value 为 null。
public bool EndsWith(String value, bool ignoreCase, CultureInfo culture);
//
// 摘要:
// 确定此实例是否与另一个指定的 System.String 对象具有相同的值。
//
// 参数:
// value:
// 要与此实例进行比较的字符串。
//
// 返回结果:
// 如果 value 参数的值与此实例相同,则为 true;否则为 false。
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)]
[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
public bool Equals(String value);
//
// 摘要:
// 确定此实例是否与指定的对象(也必须是 System.String 对象)具有相同的值。
//
// 参数:
// obj:
// 要与此实例进行比较的字符串。
//
// 返回结果:
// 如果 obj 为 System.String 并且它的值与此实例相同,则为 true;否则为 false。
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)]
public override bool Equals(object obj);
//
// 摘要:
// 确定此字符串是否与指定的 System.String 对象具有相同的值。参数指定区域性、大小写以及比较所用的排序规则。
//
// 参数:
// value:
// 要与此实例进行比较的字符串。
//
// comparisonType:
// 枚举值之一,用于指定将如何比较字符串。
//
// 返回结果:
// 如果 value 参数的值与此字符串相同,则为 true;否则为 false。
//
// 异常:
// T:System.ArgumentException:
// comparisonType 不是一个 System.StringComparison 值。
[SecuritySafeCritical]
public bool Equals(String value, StringComparison comparisonType);
//
// 摘要:
// 检索一个可以循环访问此字符串中的每个字符的对象。
//
// 返回结果:
// 枚举器对象。
public CharEnumerator GetEnumerator();
//
// 摘要:
// 返回该字符串的哈希代码。
//
// 返回结果:
// 32 位带符号整数哈希代码。
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)]
[SecuritySafeCritical]
public override int GetHashCode();
//
// 摘要:
// 返回类 System.String 的 System.TypeCode。
//
// 返回结果:
// 枚举常数 System.TypeCode.String。
[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
public TypeCode GetTypeCode();
//
// 摘要:
// 报告指定 Unicode 字符在此字符串中的第一个匹配项的索引。
//
// 参数:
// value:
// 要查找的 Unicode 字符。
//
// 返回结果:
// 如果找到该字符,则为 value 的从零开始的索引位置;如果未找到,则为 -1。
[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
public int IndexOf(char value);
//
// 摘要:
// 报告指定字符串在此实例中的第一个匹配项的索引。
//
// 参数:
// value:
// 要搜寻的字符串。
//
// 返回结果:
// 如果找到该字符串,则为 value 的从零开始的索引位置;如果未找到该字符串,则为 -1。如果 value 为 System.String.Empty,则返回值为
// 0。
//
// 异常:
// T:System.ArgumentNullException:
// value 为 null。
public int IndexOf(String value);
//
// 摘要:
// 报告指定的字符串在当前 System.String 对象中的第一个匹配项的索引。一个参数指定要用于指定字符串的搜索类型。
//
// 参数:
// value:
// 要搜寻的字符串。
//
// comparisonType:
// 指定搜索规则的枚举值之一。
//
// 返回结果:
// 如果找到该字符串,则为 value 参数的索引位置;如果未找到该字符串,则为 -1。如果 value 为 System.String.Empty,则返回值为
// 0。
//
// 异常:
// T:System.ArgumentNullException:
// value 为 null。
//
// T:System.ArgumentException:
// comparisonType 不是有效的 System.StringComparison 值。
[SecuritySafeCritical]
[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
public int IndexOf(String value, StringComparison comparisonType);
//
// 摘要:
// 报告指定 Unicode 字符在此字符串中的第一个匹配项的索引。该搜索从指定字符位置开始。
//
// 参数:
// value:
// 要查找的 Unicode 字符。
//
// startIndex:
// 搜索起始位置。
//
// 返回结果:
// 如果找到该字符,则为 value 的从零开始的索引位置;如果未找到,则为 -1。
//
// 异常:
// T:System.ArgumentOutOfRangeException:
// startIndex 小于零,或在此实例的末尾之外指定一个位置。
[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
public int IndexOf(char value, int startIndex);
//
// 摘要:
// 报告指定字符串在此实例中的第一个匹配项的索引。该搜索从指定字符位置开始。
//
// 参数:
// value:
// 要搜寻的字符串。
//
// startIndex:
// 搜索起始位置。
//
// 返回结果:
// 如果找到该字符串,则为 value 的从零开始的索引位置;如果未找到该字符串,则为 -1。如果 value 为 System.String.Empty,则返回值为
// startIndex。
//
// 异常:
// T:System.ArgumentNullException:
// value 为 null。
//
// T:System.ArgumentOutOfRangeException:
// startIndex 为负数。- 或 -startIndex 指定的位置不在此实例中。
public int IndexOf(String value, int startIndex);
//
// 摘要:
// 报告指定字符串在此实例中的第一个匹配项的索引。搜索从指定字符位置开始,并检查指定数量的字符位置。
//
// 参数:
// value:
// 要搜寻的字符串。
//
// startIndex:
// 搜索起始位置。
//
// count:
// 要检查的字符位置数。
//
// 返回结果:
// 如果找到该字符串,则为 value 的从零开始的索引位置;如果未找到该字符串,则为 -1。如果 value 为 System.String.Empty,则返回值为
// startIndex。
//
// 异常:
// T:System.ArgumentNullException:
// value 为 null。
//
// T:System.ArgumentOutOfRangeException:
// count 或 startIndex 为负。- 或 -count 加 startIndex 之和指定的位置不在此实例中。
public int IndexOf(String value, int startIndex, int count);
//
// 摘要:
// 报告指定字符在此实例中的第一个匹配项的索引。搜索从指定字符位置开始,并检查指定数量的字符位置。
//
// 参数:
// value:
// 要查找的 Unicode 字符。
//
// startIndex:
// 搜索起始位置。
//
// count:
// 要检查的字符位置数。
//
// 返回结果:
// 如果找到该字符,则为 value 的从零开始的索引位置;如果未找到,则为 -1。
//
// 异常:
// T:System.ArgumentOutOfRangeException:
// count 或 startIndex 为负。- 或 -count+startIndex 指定一个超出此实例末尾的位置。
[SecuritySafeCritical]
public int IndexOf(char value, int startIndex, int count);
//
// 摘要:
// 报告指定的字符串在当前 System.String 对象中的第一个匹配项的索引。参数指定当前字符串中的起始搜索位置以及用于指定字符串的搜索类型。
//
// 参数:
// value:
// 要搜寻的字符串。
//
// startIndex:
// 搜索起始位置。
//
// comparisonType:
// 指定搜索规则的枚举值之一。
//
// 返回结果:
// 如果找到该字符串,则为 value 参数的从零开始的索引位置;如果未找到该字符串,则为 -1。如果 value 为 System.String.Empty,则返回值为
// startIndex。
//
// 异常:
// T:System.ArgumentNullException:
// value 为 null。
//
// T:System.ArgumentOutOfRangeException:
// startIndex 为负,或者指定的位置不在此实例中。
//
// T:System.ArgumentException:
// comparisonType 不是有效的 System.StringComparison 值。
[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
public int IndexOf(String value, int startIndex, StringComparison comparisonType);
//
// 摘要:
// 报告指定的字符串在当前 System.String 对象中的第一个匹配项的索引。参数指定当前字符串中的起始搜索位置、要搜索的当前字符串中的字符数量,以及要用于指定字符串的搜索类型。
//
// 参数:
// value:
// 要搜寻的字符串。
//
// startIndex:
// 搜索起始位置。
//
// count:
// 要检查的字符位置数。
//
// comparisonType:
// 指定搜索规则的枚举值之一。
//
// 返回结果:
// 如果找到该字符串,则为 value 参数的从零开始的索引位置;如果未找到该字符串,则为 -1。如果 value 为 System.String.Empty,则返回值为
// startIndex。
//
// 异常:
// T:System.ArgumentNullException:
// value 为 null。
//
// T:System.ArgumentOutOfRangeException:
// count 或 startIndex 为负。- 或 -count 与 startIndex 之和指定的位置不在此实例中。
//
// T:System.ArgumentException:
// comparisonType 不是有效的 System.StringComparison 值。
public int IndexOf(String value, int startIndex, int count, StringComparison comparisonType);
//
// 摘要:
// 报告指定 Unicode 字符数组中的任意字符在此实例中第一个匹配项的索引。
//
// 参数:
// anyOf:
// Unicode 字符数组,包含一个或多个要查找的字符。
//
// 返回结果:
// 在此实例中第一次找到 anyOf 中的任意字符的索引位置(从零开始);如果未找到 anyOf 中的字符,则为 -1。
//
// 异常:
// T:System.ArgumentNullException:
// anyOf 为 null。
[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
public int IndexOfAny(char[] anyOf);
//
// 摘要:
// 报告指定 Unicode 字符数组中的任意字符在此实例中第一个匹配项的索引。该搜索从指定字符位置开始。
//
// 参数:
// anyOf:
// Unicode 字符数组,包含一个或多个要查找的字符。
//
// startIndex:
// 搜索起始位置。
//
// 返回结果:
// 在此实例中第一次找到 anyOf 中的任意字符的索引位置(从零开始);如果未找到 anyOf 中的字符,则为 -1。
//
// 异常:
// T:System.ArgumentNullException:
// anyOf 为 null。
//
// T:System.ArgumentOutOfRangeException:
// startIndex 为负数。- 或 -startIndex 大于此实例中的字符数。
[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
public int IndexOfAny(char[] anyOf, int startIndex);
//
// 摘要:
// 报告指定 Unicode 字符数组中的任意字符在此实例中第一个匹配项的索引。搜索从指定字符位置开始,并检查指定数量的字符位置。
//
// 参数:
// anyOf:
// Unicode 字符数组,包含一个或多个要查找的字符。
//
// startIndex:
// 搜索起始位置。
//
// count:
// 要检查的字符位置数。
//
// 返回结果:
// 在此实例中第一次找到 anyOf 中的任意字符的索引位置(从零开始);如果未找到 anyOf 中的字符,则为 -1。
//
// 异常:
// T:System.ArgumentNullException:
// anyOf 为 null。
//
// T:System.ArgumentOutOfRangeException:
// count 或 startIndex 为负。- 或 -count+startIndex 大于此实例中的字符数。
[SecuritySafeCritical]
public int IndexOfAny(char[] anyOf, int startIndex, int count);
//
// 摘要:
// 在此实例中的指定索引位置插入一个指定的 System.String 实例。
//
// 参数:
// startIndex:
// 此插入的索引位置。
//
// value:
// 要插入的字符串。
//
// 返回结果:
// 与此实例等效的一个新字符串,但在该字符串的 startIndex 位置处插入了 value。
//
// 异常:
// T:System.ArgumentNullException:
// value 为 null。
//
// T:System.ArgumentOutOfRangeException:
// startIndex 为负,或大于此实例的长度。
[SecuritySafeCritical]
public String Insert(int startIndex, String value);
//
// 摘要:
// 指示此字符串是否符合 Unicode 范式 C。
//
// 返回结果:
// 如果此字符串符合范式 C,则为 true;否则为 false。
//
// 异常:
// T:System.ArgumentException:
// 当前实例包含无效的 Unicode 字符。
public bool IsNormalized();
//
// 摘要:
// 指示此字符串是否符合指定的 Unicode 范式。
//
// 参数:
// normalizationForm:
// 一个 Unicode 范式。
//
// 返回结果:
// 如果此字符串符合由 normalizationForm 参数指定的范式,则为 true;否则为 false。
//
// 异常:
// T:System.ArgumentException:
// 当前实例包含无效的 Unicode 字符。
[SecuritySafeCritical]
public bool IsNormalized(NormalizationForm normalizationForm);
//
// 摘要:
// 报告指定 Unicode 字符在此实例中的最后一个匹配项的索引位置。
//
// 参数:
// value:
// 要查找的 Unicode 字符。
//
// 返回结果:
// 如果找到该字符,则为 value 的从零开始的索引位置;如果未找到,则为 -1。
//
// 异常:
// T:System.ArgumentNullException:
// value 为 null。
[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
public int LastIndexOf(char value);
//
// 摘要:
// 报告指定字符串在此实例中的最后一个匹配项的索引位置。
//
// 参数:
// value:
// 要搜寻的字符串。
//
// 返回结果:
// 如果找到该字符串,则为 value 的从零开始的索引位置;如果未找到该字符串,则为 -1。如果 value 为 System.String.Empty,则返回值为此实例中的最后一个索引位置。
//
// 异常:
// T:System.ArgumentNullException:
// value 为 null。
[SecuritySafeCritical]
public int LastIndexOf(String value);
//
// 摘要:
// 报告指定 Unicode 字符在此实例中的最后一个匹配项的索引位置。该搜索从指定字符位置开始。
//
// 参数:
// value:
// 要查找的 Unicode 字符。
//
// startIndex:
// 此实例内子字符串的起始位置。
//
// 返回结果:
// 如果找到该字符,则为 value 的从零开始的索引位置;如果未找到,则为 -1。
//
// 异常:
// T:System.ArgumentNullException:
// value 为 null。
//
// T:System.ArgumentOutOfRangeException:
// startIndex 小于零或大于此实例的长度。
public int LastIndexOf(char value, int startIndex);
//
// 摘要:
// 报告指定字符串在此实例中的最后一个匹配项的索引位置。该搜索从指定字符位置开始。
//
// 参数:
// value:
// 要搜寻的字符串。
//
// startIndex:
// 搜索起始位置。
//
// 返回结果:
// 如果找到该字符串,则为 value 的从零开始的索引位置;如果未找到该字符串,则为 -1。如果 value 为 System.String.Empty,则返回值为
// startIndex。
//
// 异常:
// T:System.ArgumentNullException:
// value 为 null。
//
// T:System.ArgumentOutOfRangeException:
// startIndex 小于零,或指定不在此实例内的位置。
public int LastIndexOf(String value, int startIndex);
//
// 摘要:
// 报告指定字符串在当前 System.String 对象中最后一个匹配项的索引。一个参数指定要用于指定字符串的搜索类型。
//
// 参数:
// value:
// 要搜寻的字符串。
//
// comparisonType:
// 指定搜索规则的枚举值之一。
//
// 返回结果:
// 如果找到该字符串,则为 value 参数的索引位置;如果未找到该字符串,则为 -1。如果 value 为 System.String.Empty,则返回值为此实例中的最后一个索引位置。
//
// 异常:
// T:System.ArgumentNullException:
// value 为 null。
//
// T:System.ArgumentException:
// comparisonType 不是有效的 System.StringComparison 值。
[SecuritySafeCritical]
[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
public int LastIndexOf(String value, StringComparison comparisonType);
//
// 摘要:
// 报告指定字符串在此实例中的最后一个匹配项的索引位置。搜索从指定字符位置开始,并检查指定数量的字符位置。
//
// 参数:
// value:
// 要搜寻的字符串。
//
// startIndex:
// 搜索起始位置。
//
// count:
// 要检查的字符位置数。
//
// 返回结果:
// 如果找到该字符串,则为 value 的从零开始的索引位置;如果未找到该字符串,则为 -1。如果 value 为 System.String.Empty,则返回值为
// startIndex。
//
// 异常:
// T:System.ArgumentNullException:
// value 为 null。
//
// T:System.ArgumentOutOfRangeException:
// count 或 startIndex 为负。- 或 -startIndex 大于此实例的长度。- 或 -startIndex + 1 - count 指定的位置不在此实例中。
public int LastIndexOf(String value, int startIndex, int count);
//
// 摘要:
// 报告指定的 Unicode 字符在此实例内的子字符串中的最后一个匹配项的索引位置。搜索从指定字符位置开始,并检查指定数量的字符位置。
//
// 参数:
// value:
// 要查找的 Unicode 字符。
//
// startIndex:
// 此实例内子字符串的起始位置。
//
// count:
// 要检查的字符位置数。
//
// 返回结果:
// 如果找到该字符,则为 value 的从零开始的索引位置;如果未找到,则为 -1。
//
// 异常:
// T:System.ArgumentNullException:
// value 为 null。
//
// T:System.ArgumentOutOfRangeException:
// startIndex 小于零,或大于等于此实例的长度。- 或 -startIndex + 1 - count 小于零。
[SecuritySafeCritical]
public int LastIndexOf(char value, int startIndex, int count);
//
// 摘要:
// 报告指定字符串在当前 System.String 对象中最后一个匹配项的索引。参数指定当前字符串中的起始搜索位置,以及要用于指定字符串的搜索类型。
//
// 参数:
// value:
// 要搜寻的字符串。
//
// startIndex:
// 搜索起始位置。
//
// comparisonType:
// 指定搜索规则的枚举值之一。
//
// 返回结果:
// 如果找到该字符串,则为 value 参数的索引位置;如果未找到该字符串,则为 -1。如果 value 为 System.String.Empty,则返回值为
// startIndex。
//
// 异常:
// T:System.ArgumentNullException:
// value 为 null。
//
// T:System.ArgumentOutOfRangeException:
// startIndex 小于零,或指定的位置不在此实例中。
//
// T:System.ArgumentException:
// comparisonType 不是有效的 System.StringComparison 值。
public int LastIndexOf(String value, int startIndex, StringComparison comparisonType);
//
// 摘要:
// 报告指定字符串在此实例中的最后一个匹配项的索引位置。参数指定当前字符串中的起始搜索位置、要搜索的当前字符串中的字符数量,以及要用于指定字符串的搜索类型。
//
// 参数:
// value:
// 要搜寻的字符串。
//
// startIndex:
// 搜索起始位置。
//
// count:
// 要检查的字符位置数。
//
// comparisonType:
// 指定搜索规则的枚举值之一。
//
// 返回结果:
// 如果找到该字符串,则为 value 参数的索引位置;如果未找到该字符串,则为 -1。如果 value 为 System.String.Empty,则返回值为
// startIndex。
//
// 异常:
// T:System.ArgumentNullException:
// value 为 null。
//
// T:System.ArgumentOutOfRangeException:
// count 或 startIndex 为负。- 或 -startIndex 大于此实例的长度。- 或 -startIndex + 1 - count 指定的位置不在此实例中。
//
// T:System.ArgumentException:
// comparisonType 不是有效的 System.StringComparison 值。
public int LastIndexOf(String value, int startIndex, int count, StringComparison comparisonType);
//
// 摘要:
// 报告在 Unicode 数组中指定的一个或多个字符在此实例中的最后一个匹配项的索引位置。
//
// 参数:
// anyOf:
// Unicode 字符数组,包含一个或多个要查找的字符。
//
// 返回结果:
// 最后一次在此实例中找到 anyOf 中的任意字符的索引位置;如果未找到 anyOf 中的字符,则为 -1。
//
// 异常:
// T:System.ArgumentNullException:
// anyOf 为 null。
public int LastIndexOfAny(char[] anyOf);
//
// 摘要:
// 报告在 Unicode 数组中指定的一个或多个字符在此实例中的最后一个匹配项的索引位置。该搜索从指定字符位置开始。
//
// 参数:
// anyOf:
// Unicode 字符数组,包含一个或多个要查找的字符。
//
// startIndex:
// 搜索起始位置。
//
// 返回结果:
// 最后一次在此实例中找到 anyOf 中的任意字符的索引位置;如果未找到 anyOf 中的字符,则为 -1。
//
// 异常:
// T:System.ArgumentNullException:
// anyOf 为 null。
//
// T:System.ArgumentOutOfRangeException:
// startIndex 指定的位置不在此实例中。
public int LastIndexOfAny(char[] anyOf, int startIndex);
//
// 摘要:
// 报告在 Unicode 数组中指定的一个或多个字符在此实例中的最后一个匹配项的索引位置。搜索从指定字符位置开始,并检查指定数量的字符位置。
//
// 参数:
// anyOf:
// Unicode 字符数组,包含一个或多个要查找的字符。
//
// startIndex:
// 搜索起始位置。
//
// count:
// 要检查的字符位置数。
//
// 返回结果:
// 最后一次在此实例中找到 anyOf 中的任意字符的索引位置;如果未找到 anyOf 中的字符,则为 -1。
//
// 异常:
// T:System.ArgumentNullException:
// anyOf 为 null。
//
// T:System.ArgumentOutOfRangeException:
// count 或 startIndex 为负。- 或 -startIndex 与 count 之差指定的位置不在此实例中。
[SecuritySafeCritical]
public int LastIndexOfAny(char[] anyOf, int startIndex, int count);
//
// 摘要:
// 返回一个新字符串,其文本值与此字符串相同,但其二进制表示形式符合 Unicode 范式 C。
//
// 返回结果:
// 一个新的规范化字符串,其文本值与此字符串相同,但其二进制表示形式符合范式 C。
//
// 异常:
// T:System.ArgumentException:
// 当前实例包含无效的 Unicode 字符。
public String Normalize();
//
// 摘要:
// 返回一个新字符串,其文本值与此字符串相同,但其二进制表示形式符合指定的 Unicode 范式。
//
// 参数:
// normalizationForm:
// 一个 Unicode 范式。
//
// 返回结果:
// 一个新字符串,其文本值与此字符串相同,但其二进制表示形式符合由 normalizationForm 参数指定的范式。
//
// 异常:
// T:System.ArgumentException:
// 当前实例包含无效的 Unicode 字符。
[SecuritySafeCritical]
public String Normalize(NormalizationForm normalizationForm);
//
// 摘要:
// 返回一个新字符串,该字符串通过在此实例中的字符左侧填充空格来达到指定的总长度,从而实现右对齐。
//
// 参数:
// totalWidth:
// 结果字符串中的字符数,等于原始字符数加上任何其他填充字符。
//
// 返回结果:
// 与此实例等效的一个新字符串,但该字符串为右对齐,因此,在左侧填充所需数量的空格,使长度达到 totalWidth。如果 totalWidth 小于此实例的长度,则为与此实例相同的新字符串。
//
// 异常:
// T:System.ArgumentOutOfRangeException:
// totalWidth 小于零。
public String PadLeft(int totalWidth);
//
// 摘要:
// 返回一个新字符串,该字符串通过在此实例中的字符左侧填充指定的 Unicode 字符来达到指定的总长度,从而使这些字符右对齐。
//
// 参数:
// totalWidth:
// 结果字符串中的字符数,等于原始字符数加上任何其他填充字符。
//
// paddingChar:
// Unicode 填充字符。
//
// 返回结果:
// 与此实例等效的一个新字符串,但该字符串为右对齐,因此,在左侧填充所需任意数量的 paddingChar 字符,使长度达到 totalWidth。如果 totalWidth
// 小于此实例的长度,则为与此实例相同的新字符串。
//
// 异常:
// T:System.ArgumentOutOfRangeException:
// totalWidth 小于零。
public String PadLeft(int totalWidth, char paddingChar);
//
// 摘要:
// 返回一个新字符串,该字符串通过在此字符串中的字符右侧填充空格来达到指定的总长度,从而使这些字符左对齐。
//
// 参数:
// totalWidth:
// 结果字符串中的字符数,等于原始字符数加上任何其他填充字符。
//
// 返回结果:
// 与此实例等效的一个新字符串,但该字符串为左对齐,因此,在右侧填充所需任意数量的空格,使长度达到 totalWidth。如果 totalWidth 小于此实例的长度,则为与此实例相同的新字符串。
//
// 异常:
// T:System.ArgumentOutOfRangeException:
// totalWidth 小于零。
public String PadRight(int totalWidth);
//
// 摘要:
// 返回一个新字符串,该字符串通过在此字符串中的字符右侧填充指定的 Unicode 字符来达到指定的总长度,从而使这些字符左对齐。
//
// 参数:
// totalWidth:
// 结果字符串中的字符数,等于原始字符数加上任何其他填充字符。
//
// paddingChar:
// Unicode 填充字符。
//
// 返回结果:
// 与此实例等效的一个新字符串,但该字符串为左对齐,因此,在右侧填充所需任意数量的 paddingChar 字符,使长度达到 totalWidth。如果 totalWidth
// 小于此实例的长度,则为与此实例相同的新字符串。
//
// 异常:
// T:System.ArgumentOutOfRangeException:
// totalWidth 小于零。
public String PadRight(int totalWidth, char paddingChar);
//
// 摘要:
// 删除此字符串中从指定位置到最后位置的所有字符。
//
// 参数:
// startIndex:
// 开始删除字符的从零开始的位置。
//
// 返回结果:
// 一个新字符串,除所删除的字符之外,该字符串与此字符串等效。
//
// 异常:
// T:System.ArgumentOutOfRangeException:
// startIndex 小于零。- 或 -startIndex 指定的位置不在此字符串内。
public String Remove(int startIndex);
//
// 摘要:
// 从此实例中的指定位置开始删除指定数目的字符。
//
// 参数:
// startIndex:
// 开始删除字符的从零开始的位置。
//
// count:
// 要删除的字符数。
//
// 返回结果:
// 一个新字符串,除所删除的字符之外,该字符串与此实例等效。
//
// 异常:
// T:System.ArgumentOutOfRangeException:
// startIndex 或 count 小于零。- 或 -startIndex 加 count 之和指定一个此实例外的位置。
[SecuritySafeCritical]
public String Remove(int startIndex, int count);
//
// 摘要:
// 返回一个新字符串,其中当前实例中出现的所有指定字符串都替换为另一个指定的字符串。
//
// 参数:
// oldValue:
// 要被替换的字符串。
//
// newValue:
// 要替换出现的所有 oldValue 的字符串。
//
// 返回结果:
// 与当前字符串等效的一个字符串,但其中 oldValue 的所有实例都替换为 newValue。
//
// 异常:
// T:System.ArgumentNullException:
// oldValue 为 null。
//
// T:System.ArgumentException:
// oldValue 是空字符串 ("")。
[SecuritySafeCritical]
[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
public String Replace(String oldValue, String newValue);
//
// 摘要:
// 返回一个新字符串,其中此实例中出现的所有指定 Unicode 字符都替换为另一个指定的 Unicode 字符。
//
// 参数:
// oldChar:
// 要被替换的 Unicode 字符。
//
// newChar:
// 要替换出现的所有 oldChar 的 Unicode 字符。
//
// 返回结果:
// 与此实例等效的一个字符串,但其中 oldChar 的所有实例都替换为 newChar。
[SecuritySafeCritical]
public String Replace(char oldChar, char newChar);
//
// 摘要:
// 返回的字符串数组包含此实例中的子字符串(由指定 Unicode 字符数组的元素分隔)。
//
// 参数:
// separator:
// 分隔此实例中子字符串的 Unicode 字符数组、不包含分隔符的空数组或 null。
//
// 返回结果:
// 一个数组,其元素包含此实例中的子字符串,这些子字符串由 separator 中的一个或多个字符分隔。有关更多信息,请参见“备注”部分。
public String[] Split(params char[] separator);
//
// 摘要:
// 返回的字符串数组包含此字符串中的子字符串(由指定 Unicode 字符数组的元素分隔)。参数指定是否返回空数组元素。
//
// 参数:
// separator:
// 分隔此字符串中子字符串的 Unicode 字符数组、不包含分隔符的空数组或 null。
//
// options:
// 要省略返回的数组中的空数组元素,则为 System.StringSplitOptions.RemoveEmptyEntries;要包含返回的数组中的空数组元素,则为
// System.StringSplitOptions.None。
//
// 返回结果:
// 一个数组,其元素包含此字符串中的子字符串,这些子字符串由 separator 中的一个或多个字符分隔。有关更多信息,请参见“备注”部分。
//
// 异常:
// T:System.ArgumentException:
// options 不是 System.StringSplitOptions 值之一。
[ComVisible(false)]
public String[] Split(char[] separator, StringSplitOptions options);
//
// 摘要:
// 返回的字符串数组包含此字符串中的子字符串(由指定字符串数组的元素分隔)。参数指定是否返回空数组元素。
//
// 参数:
// separator:
// 分隔此字符串中子字符串的字符串数组、不包含分隔符的空数组或 null。
//
// options:
// 要省略返回的数组中的空数组元素,则为 System.StringSplitOptions.RemoveEmptyEntries;要包含返回的数组中的空数组元素,则为
// System.StringSplitOptions.None。
//
// 返回结果:
// 一个数组,其元素包含此字符串中的子字符串,这些子字符串由 separator 中的一个或多个字符串分隔。有关更多信息,请参见“备注”部分。
//
// 异常:
// T:System.ArgumentException:
// options 不是 System.StringSplitOptions 值之一。
[ComVisible(false)]
public String[] Split(String[] separator, StringSplitOptions options);
//
// 摘要:
// 返回的字符串数组包含此实例中的子字符串(由指定 Unicode 字符数组的元素分隔)。参数指定返回的子字符串的最大数量。
//
// 参数:
// separator:
// 分隔此实例中子字符串的 Unicode 字符数组、不包含分隔符的空数组或 null。
//
// count:
// 要返回的子字符串的最大数量。
//
// 返回结果:
// 一个数组,其元素包含此实例中的子字符串,这些子字符串由 separator 中的一个或多个字符分隔。有关更多信息,请参见“备注”部分。
//
// 异常:
// T:System.ArgumentOutOfRangeException:
// count 为负数。
public String[] Split(char[] separator, int count);
//
// 摘要:
// 返回的字符串数组包含此字符串中的子字符串(由指定 Unicode 字符数组的元素分隔)。参数指定要返回子字符串的最大数量,以及是否要返回空数组元素。
//
// 参数:
// separator:
// 分隔此字符串中子字符串的 Unicode 字符数组、不包含分隔符的空数组或 null。
//
// count:
// 要返回的子字符串的最大数量。
//
// options:
// 要省略返回的数组中的空数组元素,则为 System.StringSplitOptions.RemoveEmptyEntries;要包含返回的数组中的空数组元素,则为
// System.StringSplitOptions.None。
//
// 返回结果:
// 一个数组,其元素包含此字符串中的子字符串,这些子字符串由 separator 中的一个或多个字符分隔。有关更多信息,请参见“备注”部分。
//
// 异常:
// T:System.ArgumentOutOfRangeException:
// count 为负数。
//
// T:System.ArgumentException:
// options 不是 System.StringSplitOptions 值之一。
[ComVisible(false)]
public String[] Split(char[] separator, int count, StringSplitOptions options);
//
// 摘要:
// 返回的字符串数组包含此字符串中的子字符串(由指定字符串数组的元素分隔)。参数指定要返回子字符串的最大数量,以及是否要返回空数组元素。
//
// 参数:
// separator:
// 分隔此字符串中子字符串的字符串数组、不包含分隔符的空数组或 null。
//
// count:
// 要返回的子字符串的最大数量。
//
// options:
// 要省略返回的数组中的空数组元素,则为 System.StringSplitOptions.RemoveEmptyEntries;要包含返回的数组中的空数组元素,则为
// System.StringSplitOptions.None。
//
// 返回结果:
// 一个数组,其元素包含此字符串中的子字符串,这些子字符串由 separator 中的一个或多个字符串分隔。有关更多信息,请参见“备注”部分。
//
// 异常:
// T:System.ArgumentOutOfRangeException:
// count 为负数。
//
// T:System.ArgumentException:
// options 不是 System.StringSplitOptions 值之一。
[ComVisible(false)]
public String[] Split(String[] separator, int count, StringSplitOptions options);
//
// 摘要:
// 确定此字符串实例的开头是否与指定的字符串匹配。
//
// 参数:
// value:
// 要比较的字符串。
//
// 返回结果:
// 如果 value 与此字符串的开头匹配,则为 true;否则为 false。
//
// 异常:
// T:System.ArgumentNullException:
// value 为 null。
[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
public bool StartsWith(String value);
//
// 摘要:
// 确定在使用指定的比较选项进行比较时此字符串实例的开头是否与指定的字符串匹配。
//
// 参数:
// value:
// 要比较的字符串。
//
// comparisonType:
// 枚举值之一,用于确定如何比较此字符串与 value。
//
// 返回结果:
// 如果 value 参数与此字符串的开头匹配,则为 true;否则为 false。
//
// 异常:
// T:System.ArgumentNullException:
// value 为 null。
//
// T:System.ArgumentException:
// comparisonType 不是一个 System.StringComparison 值。
[ComVisible(false)]
[SecuritySafeCritical]
public bool StartsWith(String value, StringComparison comparisonType);
//
// 摘要:
// 确定在使用指定的区域性进行比较时此字符串实例的开头是否与指定的字符串匹配。
//
// 参数:
// value:
// 要比较的字符串。
//
// ignoreCase:
// 要在比较过程中忽略大小写,则为 true;否则为 false。
//
// culture:
// 确定如何对此字符串与 value 进行比较的区域性信息。如果 culture 为 null,则使用当前区域性。
//
// 返回结果:
// 如果 value 参数与此字符串的开头匹配,则为 true;否则为 false。
//
// 异常:
// T:System.ArgumentNullException:
// value 为 null。
public bool StartsWith(String value, bool ignoreCase, CultureInfo culture);
//
// 摘要:
// 从此实例检索子字符串。子字符串从指定的字符位置开始。
//
// 参数:
// startIndex:
// 此实例中子字符串的起始字符位置(从零开始)。
//
// 返回结果:
// 与此实例中在 startIndex 处开头的子字符串等效的一个字符串;如果 startIndex 等于此实例的长度,则为 System.String.Empty。
//
// 异常:
// T:System.ArgumentOutOfRangeException:
// startIndex 小于零或大于此实例的长度。
[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
public String Substring(int startIndex);
//
// 摘要:
// 从此实例检索子字符串。子字符串从指定的字符位置开始且具有指定的长度。
//
// 参数:
// startIndex:
// 此实例中子字符串的起始字符位置(从零开始)。
//
// length:
// 子字符串中的字符数。
//
// 返回结果:
// 与此实例中在 startIndex 处开头、长度为 length 的子字符串等效的一个字符串,如果 startIndex 等于此实例的长度且 length
// 为零,则为 System.String.Empty。
//
// 异常:
// T:System.ArgumentOutOfRangeException:
// startIndex 加 length 之和指示的位置不在此实例中。- 或 -startIndex 或 length 小于零。
[SecuritySafeCritical]
[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
public String Substring(int startIndex, int length);
//
// 摘要:
// 将此实例中的字符复制到 Unicode 字符数组。
//
// 返回结果:
// 元素为此实例的各字符的 Unicode 字符数组。如果此实例是空字符串,则返回的数组为空且长度为零。
[SecuritySafeCritical]
public char[] ToCharArray();
//
// 摘要:
// 将此实例中的指定子字符串内的字符复制到 Unicode 字符数组。
//
// 参数:
// startIndex:
// 此实例内子字符串的起始位置。
//
// length:
// 此实例内子字符串的长度。
//
// 返回结果:
// 元素为此实例中从字符位置 startIndex 开始的 length 字符数的 Unicode 字符数组。
//
// 异常:
// T:System.ArgumentOutOfRangeException:
// startIndex 或 length 小于零。- 或 -startIndex 加上 length 大于此实例的长度。
[SecuritySafeCritical]
public char[] ToCharArray(int startIndex, int length);
//
// 摘要:
// 返回此字符串转换为小写形式的副本。
//
// 返回结果:
// 一个小写字符串。
public String ToLower();
//
// 摘要:
// 根据指定区域性的大小写规则返回此字符串转换为小写形式的副本。
//
// 参数:
// culture:
// 一个对象,用于提供区域性特定的大小写规则。
//
// 返回结果:
// 当前字符串的等效小写形式。
//
// 异常:
// T:System.ArgumentNullException:
// culture 为 null。
[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
public String ToLower(CultureInfo culture);
//
// 摘要:
// 返回此 System.String 对象的转换为小写形式的副本,返回时使用固定区域性的大小写规则。
//
// 返回结果:
// 当前字符串的等效小写形式。
[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
public String ToLowerInvariant();
//
// 摘要:
// 返回 System.String 的此实例;不执行实际转换。
//
// 返回结果:
// 当前的字符串。
[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
public override String ToString();
//
// 摘要:
// 返回 System.String 的此实例;不执行实际转换。
//
// 参数:
// provider:
// (保留)一个对象,用于提供区域性特定的格式设置信息。
//
// 返回结果:
// 当前的字符串。
[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
public String ToString(IFormatProvider provider);
//
// 摘要:
// 返回此字符串转换为大写形式的副本。
//
// 返回结果:
// 当前字符串的大写形式。
public String ToUpper();
//
// 摘要:
// 根据指定区域性的大小写规则返回此字符串转换为大写形式的副本。
//
// 参数:
// culture:
// 一个对象,用于提供区域性特定的大小写规则。
//
// 返回结果:
// 当前字符串的大写形式。
//
// 异常:
// T:System.ArgumentNullException:
// culture 为 null。
[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
public String ToUpper(CultureInfo culture);
//
// 摘要:
// 返回此 System.String 对象的转换为大写形式的副本,返回时使用固定区域性的大小写规则。
//
// 返回结果:
// 当前字符串的大写形式。
[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
public String ToUpperInvariant();
//
// 摘要:
// 从当前 System.String 对象移除所有前导空白字符和尾部空白字符。
//
// 返回结果:
// 从当前字符串的开头和结尾删除所有空白字符后剩余的字符串。
public String Trim();
//
// 摘要:
// 从当前 System.String 对象移除数组中指定的一组字符的所有前导匹配项和尾部匹配项。
//
// 参数:
// trimChars:
// 要删除的 Unicode 字符的数组,或 null。
//
// 返回结果:
// 从当前字符串的开头和结尾删除所出现的所有 trimChars 参数中的字符后剩余的字符串。如果 trimChars 为 null 或空数组,则改为删除空白字符。
[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
public String Trim(params char[] trimChars);
//
// 摘要:
// 从当前 System.String 对象移除数组中指定的一组字符的所有尾部匹配项。
//
// 参数:
// trimChars:
// 要删除的 Unicode 字符的数组,或 null。
//
// 返回结果:
// 从当前字符串的结尾删除所出现的所有 trimChars 参数中的字符后剩余的字符串。如果 trimChars 为 null 或空数组,则改为删除 Unicode
// 空白字符。
[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
public String TrimEnd(params char[] trimChars);
//
// 摘要:
// 从当前 System.String 对象移除数组中指定的一组字符的所有前导匹配项。
//
// 参数:
// trimChars:
// 要删除的 Unicode 字符的数组,或 null。
//
// 返回结果:
// 从当前字符串的开头删除所出现的所有 trimChars 参数中的字符后剩余的字符串。如果 trimChars 为 null 或空数组,则改为删除空白字符。
[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
public String TrimStart(params char[] trimChars);
//
// 摘要:
// 确定两个指定的字符串是否具有相同的值。
//
// 参数:
// a:
// 要比较的第一个字符串,或 null。
//
// b:
// 要比较的第二个字符串,或 null。
//
// 返回结果:
// 如果 a 的值与 b 的值相同,则为 true;否则为 false。
[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
public static bool operator ==(String a, String b);
//
// 摘要:
// 确定两个指定的字符串是否具有不同的值。
//
// 参数:
// a:
// 要比较的第一个字符串,或 null。
//
// b:
// 要比较的第二个字符串,或 null。
//
// 返回结果:
// 如果 a 的值与 b 的值不同,则为 true;否则为 false。
[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
public static bool operator !=(String a, String b);
}
}