.NETFramework:String

ylbtech-.NETFramework:String

 

1.程序集 mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089返回顶部
1、
#region 程序集 mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
// C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\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
{
    //
    // 摘要:
    //     将文本表示为 UTF-16 代码单元的序列。若要浏览此类型的.NET Framework 源代码,请参阅 Reference Source。
    [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.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.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.Char 对象中位于指定位置的 System.String 对象。
        //
        // 参数:
        //   index:
        //     当前的字符串中的位置。
        //
        // 返回结果:
        //     位于 index 位置的对象。
        //
        // 异常:
        //   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:
        //     要在比较中使用的第一个字符串。
        //
        //   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:
        //     要比较的子字符串中字符的最大数量。
        //
        // 返回结果:
        //     一个 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:
        //     要比较的第一个字符串。
        //
        //   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:
        //     要比较的第一个字符串。
        //
        //   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:
        //     要在比较中使用的第一个字符串。
        //
        //   indexA:
        //     strA 中子字符串的位置。
        //
        //   strB:
        //     要在比较中使用的第二个字符串。
        //
        //   indexB:
        //     strB 中子字符串的位置。
        //
        //   length:
        //     要比较的子字符串中字符的最大数量。
        //
        //   comparisonType:
        //     一个枚举值,用于指定比较中要使用的规则。
        //
        // 返回结果:
        //     一个 32 位带符号整数,指示两个比较数之间的词法关系。值 条件 小于零 中的子字符串 strA 之前中的子字符串 strB 在排序顺序。零 子字符串出现在同一位置的排序顺序或
        //     length 参数为零。大于零 中的子字符串 strA follllows 子字符串中 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.String 对象的数值来比较两个指定的 System.Char 对象。
        //
        // 参数:
        //   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:
        //     strA 不为 null,且 indexA 大于 strA.System.String.Length。- 或 - strB 不为 null,且 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 的四个指定实例。
        //
        // 参数:
        //   str0:
        //     要串联的第一个字符串。
        //
        //   str1:
        //     要串联的第二个字符串。
        //
        //   str2:
        //     要比较的第三个字符串。
        //
        //   str3:
        //     要比较的第四个字符串。
        //
        // 返回结果:
        //     str0、str1、str2 和 str3 的串联。
        [SecuritySafeCritical]
        public static String Concat(String str0, String str1, String str2, String str3);
        //
        // 摘要:
        //     连接指定的 System.String 数组的元素。
        //
        // 参数:
        //   values:
        //     字符串实例的数组。
        //
        // 返回结果:
        //     values 的串联元素。
        //
        // 异常:
        //   T:System.ArgumentNullException:
        //     values 为 null。
        //
        //   T:System.OutOfMemoryException:
        //     内存不足。
        public static String Concat(params String[] values);
        //
        // 摘要:
        //     连接两个指定对象的字符串表示形式。
        //
        // 参数:
        //   arg0:
        //     要连接的第一个对象。
        //
        //   arg1:
        //     要连接的第二个对象。
        //
        // 返回结果:
        //     arg0 和 arg1 的值的串联字符串表示形式。
        public static String Concat(object arg0, object arg1);
        //
        // 摘要:
        //     连接三个指定对象的字符串表示形式。
        //
        // 参数:
        //   arg0:
        //     要连接的第一个对象。
        //
        //   arg1:
        //     要连接的第二个对象。
        //
        //   arg2:
        //     要连接的第三个对象。
        //
        // 返回结果:
        //     arg0、arg1 和 arg2 的值的串联字符串表示形式。
        public static String Concat(object arg0, object arg1, object arg2);
        //
        // 摘要:
        //     创建指定对象的字符串表示形式。
        //
        // 参数:
        //   arg0:
        //     要表示的对象,或 null。
        //
        // 返回结果:
        //     arg0 的值的字符串表示形式,如果 System.String.Empty 为 arg0,则为 null。
        public static String Concat(object arg0);
        //
        // 摘要:
        //     连接指定 System.Object 数组中的元素的字符串表示形式。
        //
        // 参数:
        //   args:
        //     一个对象数组,其中包含要连接的元素。
        //
        // 返回结果:
        //     args 中元素的值的串联字符串表示形式。
        //
        // 异常:
        //   T:System.ArgumentNullException:
        //     args 为 null。
        //
        //   T:System.OutOfMemoryException:
        //     内存不足。
        public static String Concat(params object[] args);
        //
        // 摘要:
        //     串联 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.Collections.Generic.IEnumerable`1 的 System.String 构造集合的成员。
        //
        // 参数:
        //   values:
        //     一个集合对象,该对象实现 System.Collections.Generic.IEnumerable`1,且其泛型类型参数为 System.String。
        //
        // 返回结果:
        //     中的串联的字符串 values, ,或 System.String.Empty 如果 values 是一个空 IEnumerable(Of String)。
        //
        // 异常:
        //   T:System.ArgumentNullException:
        //     values 为 null。
        [ComVisible(false)]
        public static String Concat(IEnumerable<String> values);
        //
        // 摘要:
        //     连接 System.String 的两个指定实例。
        //
        // 参数:
        //   str0:
        //     要串联的第一个字符串。
        //
        //   str1:
        //     要串联的第二个字符串。
        //
        // 返回结果:
        //     str0 和 str1 的串联。
        [SecuritySafeCritical]
        public static String Concat(String str0, String str1);
        [CLSCompliant(false)]
        public static String Concat(object arg0, object arg1, object arg2, object arg3);
        //
        // 摘要:
        //     连接 System.String 的三个指定实例。
        //
        // 参数:
        //   str0:
        //     要串联的第一个字符串。
        //
        //   str1:
        //     要串联的第二个字符串。
        //
        //   str2:
        //     要比较的第三个字符串。
        //
        // 返回结果:
        //     str0、str1 和 str2 的串联。
        [SecuritySafeCritical]
        public static String Concat(String str0, String str1, String str2);
        //
        // 摘要:
        //     创建一个与指定的 System.String 具有相同值的 System.String 的新实例。
        //
        // 参数:
        //   str:
        //     要复制的字符串。
        //
        // 返回结果:
        //     值与 str 相同的新字符串。
        //
        // 异常:
        //   T:System.ArgumentNullException:
        //     str 为 null。
        [SecuritySafeCritical]
        public static String Copy(String str);
        //
        // 摘要:
        //     确定两个指定的 System.String 对象是否具有相同的值。 参数指定区域性、大小写以及比较所用的排序规则。
        //
        // 参数:
        //   a:
        //     要比较的第一个字符串,或 null。
        //
        //   b:
        //     要比较的第二个字符串,或 null。
        //
        //   comparisonType:
        //     枚举值之一,用于指定比较的规则。
        //
        // 返回结果:
        //     如果 true 参数的值与 a 参数的值相同,则为 b;否则为 false。
        //
        // 异常:
        //   T:System.ArgumentException:
        //     comparisonType 不是 System.StringComparison 值。
        [SecuritySafeCritical]
        public static bool Equals(String a, String b, StringComparison comparisonType);
        //
        // 摘要:
        //     确定两个指定的 System.String 对象是否具有相同的值。
        //
        // 参数:
        //   a:
        //     要比较的第一个字符串,或 null。
        //
        //   b:
        //     要比较的第二个字符串,或 null。
        //
        // 返回结果:
        //     如果 true 的值与 a 的值相同,则为 b;否则为 false。 如果 a 和 b 均为 null,此方法将返回 true。
        [TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
        public static bool Equals(String a, String b);
        //
        // 摘要:
        //     将指定字符串中的格式项替换为指定数组中相应对象的字符串表示形式。 参数提供区域性特定的格式设置信息。
        //
        // 参数:
        //   provider:
        //     一个提供区域性特定的格式设置信息的对象。
        //
        //   format:
        //     复合格式字符串。
        //
        //   args:
        //     一个对象数组,其中包含零个或多个要设置格式的对象。
        //
        // 返回结果:
        //     format 的副本,其中格式项已替换为 args 中相应对象的字符串表示形式。
        //
        // 异常:
        //   T:System.ArgumentNullException:
        //     format 或 args 为 null。
        //
        //   T:System.FormatException:
        //     format 无效。- 或 - 格式项的索引小于零,或者大于或等于 args 数组的长度。
        public static String Format(IFormatProvider provider, String format, params object[] args);
        //
        // 摘要:
        //     将指定字符串中的格式项替换为指定数组中相应对象的字符串表示形式。
        //
        // 参数:
        //   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:
        //     要设置格式的第一个对象。
        //
        //   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);
        //
        // 摘要:
        //     将指定字符串中的一个或多个格式项替换为指定对象的字符串表示形式。
        //
        // 参数:
        //   format:
        //     复合格式字符串。
        //
        //   arg0:
        //     要设置格式的对象。
        //
        // 返回结果:
        //     format 的副本,其中的任何格式项均替换为 arg0 的字符串表示形式。
        //
        // 异常:
        //   T:System.ArgumentNullException:
        //     format 为 null。
        //
        //   T:System.FormatException:
        //     format 中的格式项无效。- 或 - 格式项的索引不为零。
        public static String Format(String format, object arg0);
        //
        // 摘要:
        //     将指定字符串中的格式项替换为两个指定对象的字符串表示形式。
        //
        // 参数:
        //   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);
        //
        // 摘要:
        //     检索系统对指定 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:
        //     要测试的字符串。
        //
        // 返回结果:
        //     如果 true 参数为 value 或空字符串 (""),则为 null;否则为 false。
        [TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
        public static bool IsNullOrEmpty(String value);
        //
        // 摘要:
        //     指示指定的字符串是 null、空还是仅由空白字符组成。
        //
        // 参数:
        //   value:
        //     要测试的字符串。
        //
        // 返回结果:
        //     如果 true 参数为 value 或 null,或者如果 System.String.Empty 仅由空白字符组成,则为 value。
        public static bool IsNullOrWhiteSpace(String value);
        //
        // 摘要:
        //     串联集合的成员,其中在每个成员之间使用指定的分隔符。
        //
        // 参数:
        //   separator:
        //     要用作分隔符的字符串。只有在 values 具有多个元素时,separator 才包括在返回的字符串中。
        //
        //   values:
        //     一个包含要串联的对象的集合。
        //
        // 类型参数:
        //   T:
        //     values 成员的类型。
        //
        // 返回结果:
        //     一个由 values 的成员组成的字符串,这些成员以 separator 字符串分隔。 如果 values 没有成员,则该方法返回 System.String.Empty。
        //
        // 异常:
        //   T:System.ArgumentNullException:
        //     values 为 null。
        [ComVisible(false)]
        public static String Join<T>(String separator, IEnumerable<T> values);
        //
        // 摘要:
        //     串联对象数组的各个元素,其中在每个元素之间使用指定的分隔符。
        //
        // 参数:
        //   separator:
        //     要用作分隔符的字符串。只有在 values 具有多个元素时,separator 才包括在返回的字符串中。
        //
        //   values:
        //     一个数组,其中包含要连接的元素。
        //
        // 返回结果:
        //     一个由 values 的元素组成的字符串,这些元素以 separator 字符串分隔。 如果 values 为空数组,该方法将返回 System.String.Empty。
        //
        // 异常:
        //   T:System.ArgumentNullException:
        //     values 为 null。
        [ComVisible(false)]
        public static String Join(String separator, params object[] values);
        //
        // 摘要:
        //     串联字符串数组的所有元素,其中在每个元素之间使用指定的分隔符。
        //
        // 参数:
        //   separator:
        //     要用作分隔符的字符串。 只有在 separator 具有多个元素时,value 才包括在返回的字符串中。
        //
        //   value:
        //     一个数组,其中包含要连接的元素。
        //
        // 返回结果:
        //     一个由 value 中的元素组成的字符串,这些元素以 separator 字符串分隔。 如果 value 为空数组,该方法将返回 System.String.Empty。
        //
        // 异常:
        //   T:System.ArgumentNullException:
        //     value 为 null。
        public static String Join(String separator, params String[] value);
        //
        // 摘要:
        //     串联字符串数组的指定元素,其中在每个元素之间使用指定的分隔符。
        //
        // 参数:
        //   separator:
        //     要用作分隔符的字符串。 只有在 separator 具有多个元素时,value 才包括在返回的字符串中。
        //
        //   value:
        //     一个数组,其中包含要连接的元素。
        //
        //   startIndex:
        //     value 中要使用的第一个元素。
        //
        //   count:
        //     要使用的 value 的元素数。
        //
        // 返回结果:
        //     由 value 中的字符串组成的字符串,这些字符串以 separator 字符串分隔。- 或 -如果 System.String.Empty 为零,count
        //     没有元素,或 value 以及 separator 的全部元素均为 value,则为 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);
        //
        // 摘要:
        //     串联类型为 System.Collections.Generic.IEnumerable`1 的 System.String 构造集合的成员,其中在每个成员之间使用指定的分隔符。
        //
        // 参数:
        //   separator:
        //     要用作分隔符的字符串。只有在 values 具有多个元素时,separator 才包括在返回的字符串中。
        //
        //   values:
        //     一个包含要串联的字符串的集合。
        //
        // 返回结果:
        //     一个由 values 的成员组成的字符串,这些成员以 separator 字符串分隔。 如果 values 没有成员,则该方法返回 System.String.Empty。
        //
        // 异常:
        //   T:System.ArgumentNullException:
        //     values 为 null。
        [ComVisible(false)]
        public static String Join(String separator, IEnumerable<String> 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 对象进行比较,并指示此实例在排序顺序中是位于指定的字符串之前、之后还是与其出现在同一位置。
        //
        // 参数:
        //   strB:
        //     要与此实例进行比较的字符串。
        //
        // 返回结果:
        //     一个 32 位带符号整数,该整数指示此实例在排序顺序中是位于 strB 参数之前、之后还是与其出现在同一位置。值 条件 小于零 此实例位于 strB 之前。零
        //     此实例在排序顺序中的位置与 strB 相同。大于零 此实例位于 strB 之后。- 或 - strB 为 null。
        [TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
        public int CompareTo(String strB);
        //
        // 摘要:
        //     返回一个值,该值指示指定的子串是否出现在此字符串中。
        //
        // 参数:
        //   value:
        //     要搜寻的字符串。
        //
        // 返回结果:
        //     如果 true 参数出现在此字符串中,或者 value 为空字符串 (""),则为 value;否则为 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 为负 - 或 - sourceIndex 不标识当前实例中的位置。- 或 -destinationIndex
        //     不标识 destination 数组中的有效索引。- 或 -count 大于从 startIndex 到此实例末尾的子字符串的长度 - 或 - count
        //     从子数组的长度大于 destinationIndex 到末尾 destination 数组。
        [SecuritySafeCritical]
        public void CopyTo(int sourceIndex, char[] destination, int destinationIndex, int count);
        //
        // 摘要:
        //     确定此字符串实例的结尾是否与指定的字符串匹配。
        //
        // 参数:
        //   value:
        //     要与此实例末尾的子字符串进行比较的字符串。
        //
        // 返回结果:
        //     如果 true 与此实例的末尾匹配,则为 value;否则为 false。
        //
        // 异常:
        //   T:System.ArgumentNullException:
        //     value 为 null。
        public bool EndsWith(String value);
        //
        // 摘要:
        //     确定使用指定的比较选项进行比较时此字符串实例的结尾是否与指定的字符串匹配。
        //
        // 参数:
        //   value:
        //     要与此实例末尾的子字符串进行比较的字符串。
        //
        //   comparisonType:
        //     枚举值之一,用于确定如何比较此字符串与 value。
        //
        // 返回结果:
        //     如果 true 参数与此字符串的末尾匹配,则为 value;否则为 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,则使用当前区域性。
        //
        // 返回结果:
        //     如果 true 参数与此字符串的末尾匹配,则为 value;否则为 false。
        //
        // 异常:
        //   T:System.ArgumentNullException:
        //     value 为 null。
        public bool EndsWith(String value, bool ignoreCase, CultureInfo culture);
        //
        // 摘要:
        //     确定此实例是否与另一个指定的 System.String 对象具有相同的值。
        //
        // 参数:
        //   value:
        //     要与此实例进行比较的字符串。
        //
        // 返回结果:
        //     如果 true 参数的值与此实例的值相同,则为 value;否则为 false。 如果 value 为 null,则此方法返回 false。
        [ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)]
        [TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
        public bool Equals(String value);
        //
        // 摘要:
        //     确定此字符串是否与另一个指定的 System.String 对象具有相同的值。 参数指定区域性、大小写以及比较所用的排序规则。
        //
        // 参数:
        //   value:
        //     要与此实例进行比较的字符串。
        //
        //   comparisonType:
        //     枚举值之一,用于指定如何比较字符串。
        //
        // 返回结果:
        //     如果 true 参数的值与此字符串相同,则为 value;否则为 false。
        //
        // 异常:
        //   T:System.ArgumentException:
        //     comparisonType 不是 System.StringComparison 值。
        [SecuritySafeCritical]
        public bool Equals(String value, StringComparison comparisonType);
        //
        // 摘要:
        //     确定此实例是否与指定的对象(也必须是 System.String 对象)具有相同的值。
        //
        // 参数:
        //   obj:
        //     要与此实例进行比较的字符串。
        //
        // 返回结果:
        //     如果 true 是一个 obj 且其值与此实例相等,则为 System.String;否则为 false。 如果 obj 为 null,则此方法返回 false。
        [ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)]
        public override bool Equals(object obj);
        //
        // 摘要:
        //     检索一个可以循环访问此字符串中的每个字符的对象。
        //
        // 返回结果:
        //     枚举器对象。
        public CharEnumerator GetEnumerator();
        //
        // 摘要:
        //     返回该字符串的哈希代码。
        //
        // 返回结果:
        //     32 位有符号整数哈希代码。
        [ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)]
        [SecuritySafeCritical]
        public override int GetHashCode();
        //
        // 摘要:
        //     返回类 System.TypeCode 的 System.String。
        //
        // 返回结果:
        //     枚举常数 System.TypeCode.String。
        [TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
        public TypeCode GetTypeCode();
        //
        // 摘要:
        //     报告指定的字符串在当前 System.String 对象中的第一个匹配项的从零开始的索引。 参数指定当前字符串中的起始搜索位置、要搜索的当前字符串中的字符数量,以及要用于指定字符串的搜索类型。
        //
        // 参数:
        //   value:
        //     要搜寻的字符串。
        //
        //   startIndex:
        //     搜索起始位置。
        //
        //   count:
        //     要检查的字符位置数。
        //
        //   comparisonType:
        //     指定搜索规则的枚举值之一。
        //
        // 返回结果:
        //     如果找到该字符串,则为从当前实例的起始位置开始的从零开始的 value 参数索引位置;否则为 -1。 如果 value 为 System.String.Empty,则返回值为
        //     startIndex。
        //
        // 异常:
        //   T:System.ArgumentNullException:
        //     value 为 null。
        //
        //   T:System.ArgumentOutOfRangeException:
        //     count 或 startIndex 为负数。- 或 - startIndex 大于此实例的长度。- 或 -count 概率大于减去此字符串的长度小于 startIndex。
        //
        //   T:System.ArgumentException:
        //     comparisonType 不是有效的 System.StringComparison 值。
        [SecuritySafeCritical]
        public int IndexOf(String value, int startIndex, int count, StringComparison comparisonType);
        //
        // 摘要:
        //     报告指定的字符串在当前 System.String 对象中的第一个匹配项的从零开始的索引。 参数指定当前字符串中的起始搜索位置以及用于指定字符串的搜索类型。
        //
        // 参数:
        //   value:
        //     要搜寻的字符串。
        //
        //   startIndex:
        //     搜索起始位置。
        //
        //   comparisonType:
        //     指定搜索规则的枚举值之一。
        //
        // 返回结果:
        //     如果找到该字符串,则为从当前实例的起始位置开始的从零开始的 value 参数索引位置;否则为 -1。 如果 value 为 System.String.Empty,则返回值为
        //     startIndex。
        //
        // 异常:
        //   T:System.ArgumentNullException:
        //     value 为 null。
        //
        //   T:System.ArgumentOutOfRangeException:
        //     startIndex 小于 0(零)或大于此字符串的长度。
        //
        //   T:System.ArgumentException:
        //     comparisonType 不是有效的 System.StringComparison 值。
        [TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
        public int IndexOf(String value, int startIndex, StringComparison comparisonType);
        //
        // 摘要:
        //     报告指定字符串在此实例中的第一个匹配项的从零开始的索引。 搜索从指定字符位置开始,并检查指定数量的字符位置。
        //
        // 参数:
        //   value:
        //     要搜寻的字符串。
        //
        //   startIndex:
        //     搜索起始位置。
        //
        //   count:
        //     要检查的字符位置数。
        //
        // 返回结果:
        //     如果找到该字符串,则为从当前实例的起始位置开始的从零开始的 value 的索引位置;否则为 -1。 如果 value 为 System.String.Empty,则返回值为
        //     startIndex。
        //
        // 异常:
        //   T:System.ArgumentNullException:
        //     value 为 null。
        //
        //   T:System.ArgumentOutOfRangeException:
        //     count 或 startIndex 为负数。- 或 - startIndex 大于此字符串的长度。- 或 -count 概率大于减去此字符串的长度小于
        //     startIndex。
        public int IndexOf(String value, int startIndex, int count);
        //
        // 摘要:
        //     报告指定字符在此实例中的第一个匹配项的从零开始的索引。 搜索从指定字符位置开始,并检查指定数量的字符位置。
        //
        // 参数:
        //   value:
        //     要查找的 Unicode 字符。
        //
        //   startIndex:
        //     搜索起始位置。
        //
        //   count:
        //     要检查的字符位置数。
        //
        // 返回结果:
        //     如果找到该字符,则为从字符串的起始位置开始的 value 从零开始的索引位置;否则为 -1。
        //
        // 异常:
        //   T:System.ArgumentOutOfRangeException:
        //     count 或 startIndex 为负数。- 或 - startIndex 大于此字符串的长度。- 或 -count 概率大于减去此字符串的长度小于
        //     startIndex。
        [SecuritySafeCritical]
        public int IndexOf(char value, int startIndex, int count);
        //
        // 摘要:
        //     报告指定字符串在此实例中的第一个匹配项的从零开始的索引。
        //
        // 参数:
        //   value:
        //     要搜寻的字符串。
        //
        // 返回结果:
        //     如果找到该字符串,则为 value 的从零开始的索引位置;如果未找到该字符串,则为 -1。 如果 value 为 System.String.Empty,则返回值为
        //     0。
        //
        // 异常:
        //   T:System.ArgumentNullException:
        //     value 为 null。
        public int IndexOf(String value);
        //
        // 摘要:
        //     报告指定 Unicode 字符在此字符串中的第一个匹配项的从零开始的索引。 该搜索从指定字符位置开始。
        //
        // 参数:
        //   value:
        //     要查找的 Unicode 字符。
        //
        //   startIndex:
        //     搜索起始位置。
        //
        // 返回结果:
        //     如果找到该字符,则为从字符串的起始位置开始的 value 从零开始的索引位置;否则为 -1。
        //
        // 异常:
        //   T:System.ArgumentOutOfRangeException:
        //     startIndex 小于 0(零)或大于此字符串的长度。
        [TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
        public int IndexOf(char value, int startIndex);
        //
        // 摘要:
        //     报告指定 Unicode 字符在此字符串中的第一个匹配项的从零开始的索引。
        //
        // 参数:
        //   value:
        //     要查找的 Unicode 字符。
        //
        // 返回结果:
        //     如果找到该字符,则为 value 的从零开始的索引位置;如果未找到,则为 -1。
        [TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
        public int IndexOf(char value);
        //
        // 摘要:
        //     报告指定字符串在此实例中的第一个匹配项的从零开始的索引。 该搜索从指定字符位置开始。
        //
        // 参数:
        //   value:
        //     要搜寻的字符串。
        //
        //   startIndex:
        //     搜索起始位置。
        //
        // 返回结果:
        //     如果找到该字符串,则为从当前实例的起始位置开始的从零开始的 value 的索引位置;否则为 -1。 如果 value 为 System.String.Empty,则返回值为
        //     startIndex。
        //
        // 异常:
        //   T:System.ArgumentNullException:
        //     value 为 null。
        //
        //   T:System.ArgumentOutOfRangeException:
        //     startIndex 小于 0(零)或大于此字符串的长度。
        public int IndexOf(String value, int startIndex);
        //
        // 摘要:
        //     报告指定的字符串在当前 System.String 对象中的第一个匹配项的从零开始的索引。 一个参数指定要用于指定字符串的搜索类型。
        //
        // 参数:
        //   value:
        //     要搜寻的字符串。
        //
        //   comparisonType:
        //     指定搜索规则的枚举值之一。
        //
        // 返回结果:
        //     如果找到该字符串,则为 value 参数的索引位置;如果未找到该字符串,则为 -1。 如果 value 为 System.String.Empty,则返回值为
        //     0。
        //
        // 异常:
        //   T:System.ArgumentNullException:
        //     value 为 null。
        //
        //   T:System.ArgumentException:
        //     comparisonType 不是有效的 System.StringComparison 值。
        [TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
        public int IndexOf(String value, StringComparison comparisonType);
        //
        // 摘要:
        //     报告指定 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 字符数组,包含一个或多个要查找的字符。
        //
        // 返回结果:
        //     在此实例中第一次找到 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:
        //     搜索起始位置。
        //
        //   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);
        //
        // 摘要:
        //     返回一个新的字符串,在此实例中的指定的索引位置插入指定的字符串。
        //
        // 参数:
        //   startIndex:
        //     插入的从零开始的索引位置。
        //
        //   value:
        //     要插入的字符串。
        //
        // 返回结果:
        //     与此实例等效的一个新字符串,但在该字符串的 value 位置处插入了 startIndex。
        //
        // 异常:
        //   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 范式。
        //
        // 返回结果:
        //     如果此字符串符合由 true 参数指定的范式,则为 normalizationForm;否则为 false。
        //
        // 异常:
        //   T:System.ArgumentException:
        //     当前实例包含无效的 Unicode 字符。
        [SecuritySafeCritical]
        public bool IsNormalized(NormalizationForm normalizationForm);
        //
        // 摘要:
        //     报告指定字符串在此实例中的最后一个匹配项的从零开始的索引的位置。
        //
        // 参数:
        //   value:
        //     要搜寻的字符串。
        //
        // 返回结果:
        //     如果找到该字符串,则为 value 的从零开始的起始索引位置;如果未找到该字符串,则为 -1。 如果 value 为 System.String.Empty,则返回值为此实例中的最后一个索引位置。
        //
        // 异常:
        //   T:System.ArgumentNullException:
        //     value 为 null。
        public int LastIndexOf(String value);
        //
        // 摘要:
        //     报告指定字符串在此实例中的最后一个匹配项的从零开始的索引的位置。 在指定的字符位置开始和在向后的右边该字符串的开头处理的搜索。
        //
        // 参数:
        //   value:
        //     要搜寻的字符串。
        //
        //   startIndex:
        //     搜索起始位置。 从 startIndex 此实例的开头开始搜索。
        //
        // 返回结果:
        //     如果找到该字符串,则为 value 的从零开始的起始索引位置;如果未找到该字符串或当前实例等于 System.String.Empty,则为 -1。 如果
        //     value 为 System.String.Empty,则返回值为 startIndex 和此实例中的最后一个索引位置中的较小者。
        //
        // 异常:
        //   T:System.ArgumentNullException:
        //     value 为 null。
        //
        //   T:System.ArgumentOutOfRangeException:
        //     当前实例不等于 System.String.Empty,并且 startIndex 小于零或大于当前实例的长度。- 或 -当前实例等于 System.String.Empty,并且
        //     startIndex 小于-1 或大于零。
        public int LastIndexOf(String value, int startIndex);
        //
        // 摘要:
        //     报告指定字符串在此实例中的最后一个匹配项的从零开始的索引的位置。 搜索在指定字符位置的数目的字符串开始时,开始指定字符和其后面的位置。
        //
        // 参数:
        //   value:
        //     要搜寻的字符串。
        //
        //   startIndex:
        //     搜索起始位置。 从 startIndex 此实例的开头开始搜索。
        //
        //   count:
        //     要检查的字符位置数。
        //
        // 返回结果:
        //     如果找到该字符串,则为 value 的从零开始的起始索引位置;如果未找到该字符串或当前实例等于 System.String.Empty,则为 -1。 如果
        //     value 为 System.String.Empty,则返回值为 startIndex 和此实例中的最后一个索引位置中的较小者。
        //
        // 异常:
        //   T:System.ArgumentNullException:
        //     value 为 null。
        //
        //   T:System.ArgumentOutOfRangeException:
        //     count 为负数。- 或 -当前实例不等于 System.String.Empty,并且 startIndex 为负数。- 或 - 当前实例不等于 System.String.Empty,并且
        //     startIndex 大于此实例的长度。- 或 -当前实例不等于 System.String.Empty,并且 startIndex - count+ 1
        //     指定不在此实例内的位置。- 或 -当前实例等于 System.String.Empty 并且 start 小于 -1 或大于零。- 或 -当前实例等于 System.String.Empty
        //     并且 count 大于 1。
        public int LastIndexOf(String value, int startIndex, int count);
        //
        // 摘要:
        //     报告指定字符串在当前 System.String 对象中最后一个匹配项的从零开始的索引。 一个参数指定要用于指定字符串的搜索类型。
        //
        // 参数:
        //   value:
        //     要搜寻的字符串。
        //
        //   comparisonType:
        //     指定搜索规则的枚举值之一。
        //
        // 返回结果:
        //     如果找到该字符串,则为 value 参数的从零开始的起始索引位置;如果未找到该字符串,则为 -1。 如果 value 为 System.String.Empty,则返回值为此实例中的最后一个索引位置。
        //
        // 异常:
        //   T:System.ArgumentNullException:
        //     value 为 null。
        //
        //   T:System.ArgumentException:
        //     comparisonType 不是有效的 System.StringComparison 值。
        [TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
        public int LastIndexOf(String value, StringComparison comparisonType);
        //
        // 摘要:
        //     报告指定字符串在当前 System.String 对象中最后一个匹配项的从零开始的索引。 在指定的字符位置开始和在向后的右边该字符串的开头处理的搜索。 一个参数指定要执行搜索指定字符串的比较类型。
        //
        // 参数:
        //   value:
        //     要搜寻的字符串。
        //
        //   startIndex:
        //     搜索起始位置。 从 startIndex 此实例的开头开始搜索。
        //
        //   comparisonType:
        //     指定搜索规则的枚举值之一。
        //
        // 返回结果:
        //     如果找到该字符串,则为 value 参数的从零开始的起始索引位置;如果未找到该字符串或当前实例等于 System.String.Empty,则为 -1。
        //     如果 value 为 System.String.Empty,则返回值为 startIndex 和此实例中的最后一个索引位置中的较小者。
        //
        // 异常:
        //   T:System.ArgumentNullException:
        //     value 为 null。
        //
        //   T:System.ArgumentOutOfRangeException:
        //     当前实例不等于 System.String.Empty,并且 startIndex 小于零或大于当前实例的长度。- 或 -当前实例等于 System.String.Empty,并且
        //     startIndex 小于-1 或大于零。
        //
        //   T:System.ArgumentException:
        //     comparisonType 不是有效的 System.StringComparison 值。
        public int LastIndexOf(String value, int startIndex, StringComparison comparisonType);
        //
        // 摘要:
        //     报告指定字符串在此实例中的最后一个匹配项的从零开始的索引的位置。 搜索在所指定的字符位置的数目的字符串开始时,开始指定字符和其后面的位置。 一个参数指定要执行搜索指定字符串的比较类型。
        //
        // 参数:
        //   value:
        //     要搜寻的字符串。
        //
        //   startIndex:
        //     搜索起始位置。 从 startIndex 此实例的开头开始搜索。
        //
        //   count:
        //     要检查的字符位置数。
        //
        //   comparisonType:
        //     指定搜索规则的枚举值之一。
        //
        // 返回结果:
        //     如果找到该字符串,则为 value 参数的从零开始的起始索引位置;如果未找到该字符串或当前实例等于 System.String.Empty,则为 -1。
        //     如果 value 为 System.String.Empty,则返回值为 startIndex 和此实例中的最后一个索引位置中的较小者。
        //
        // 异常:
        //   T:System.ArgumentNullException:
        //     value 为 null。
        //
        //   T:System.ArgumentOutOfRangeException:
        //     count 为负数。- 或 -当前实例不等于 System.String.Empty,并且 startIndex 为负数。- 或 - 当前实例不等于 System.String.Empty,并且
        //     startIndex 大于此实例的长度。- 或 -当前实例不等于 System.String.Empty, ,和 startIndex + 1- count
        //     指定一个不在此实例内的位置。- 或 -当前实例等于 System.String.Empty 并且 start 小于 -1 或大于零。- 或 -当前实例等于
        //     System.String.Empty 并且 count 大于 1。
        //
        //   T:System.ArgumentException:
        //     comparisonType 不是有效的 System.StringComparison 值。
        [SecuritySafeCritical]
        public int LastIndexOf(String value, int startIndex, int count, StringComparison comparisonType);
        //
        // 摘要:
        //     报告指定 Unicode 字符在此实例中的最后一个匹配项的从零开始的索引的位置。
        //
        // 参数:
        //   value:
        //     要查找的 Unicode 字符。
        //
        // 返回结果:
        //     如果找到该字符,则为 value 的从零开始的索引位置;如果未找到,则为 -1。
        [TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
        public int LastIndexOf(char value);
        //
        // 摘要:
        //     报告指定的 Unicode 字符在此实例内的子字符串中的最后一个匹配项的从零开始的索引的位置。 搜索在指定字符位置的数目的字符串开始时,开始指定字符和其后面的位置。
        //
        // 参数:
        //   value:
        //     要查找的 Unicode 字符。
        //
        //   startIndex:
        //     搜索的起始位置。 从 startIndex 此实例的开头开始搜索。
        //
        //   count:
        //     要检查的字符位置数。
        //
        // 返回结果:
        //     如果找到该字符,则为 value 的从零开始的索引位置;如果未找到该字符或当前实例等于 System.String.Empty,则为 -1。
        //
        // 异常:
        //   T:System.ArgumentOutOfRangeException:
        //     当前实例不等于 System.String.Empty,并且 startIndex 小于零或大于等于当前实例的长度。- 或 -当前实例不等于 System.String.Empty,并且
        //     startIndex - count + 1 小于零。
        [SecuritySafeCritical]
        public int LastIndexOf(char value, int startIndex, int count);
        //
        // 摘要:
        //     报告指定 Unicode 字符在此实例中的最后一个匹配项的从零开始的索引的位置。 在指定的字符位置开始和在向后的右边该字符串的开头处理的搜索。
        //
        // 参数:
        //   value:
        //     要查找的 Unicode 字符。
        //
        //   startIndex:
        //     搜索的起始位置。 从 startIndex 此实例的开头开始搜索。
        //
        // 返回结果:
        //     如果找到该字符,则为 value 的从零开始的索引位置;如果未找到该字符或当前实例等于 System.String.Empty,则为 -1。
        //
        // 异常:
        //   T:System.ArgumentOutOfRangeException:
        //     当前实例不等于 System.String.Empty,并且 startIndex 小于零或大于等于当前实例的长度。
        public int LastIndexOf(char value, int startIndex);
        //
        // 摘要:
        //     报告在 Unicode 数组中指定的一个或多个字符在此实例中的最后一个匹配项的从零开始的索引的位置。
        //
        // 参数:
        //   anyOf:
        //     Unicode 字符数组,包含一个或多个要查找的字符。
        //
        // 返回结果:
        //     最后一次在此实例中找到 anyOf 中的任意字符的索引位置;如果未找到 anyOf 中的字符,则为 -1。
        //
        // 异常:
        //   T:System.ArgumentNullException:
        //     anyOf 为 null。
        public int LastIndexOfAny(char[] anyOf);
        //
        // 摘要:
        //     报告在 Unicode 数组中指定的一个或多个字符在此实例中的最后一个匹配项的从零开始的索引的位置。 搜索在指定字符位置的数目的字符串开始时,开始指定字符和其后面的位置。
        //
        // 参数:
        //   anyOf:
        //     Unicode 字符数组,包含一个或多个要查找的字符。
        //
        //   startIndex:
        //     搜索起始位置。 从 startIndex 此实例的开头开始搜索。
        //
        //   count:
        //     要检查的字符位置数。
        //
        // 返回结果:
        //     最后一次在此实例中找到 anyOf 中的任意字符的索引位置;如果未找到 anyOf 中的字符或者当前实例等于System.String.Empty,则为
        //     -1。
        //
        // 异常:
        //   T:System.ArgumentNullException:
        //     anyOf 为 null。
        //
        //   T:System.ArgumentOutOfRangeException:
        //     当前实例不等于 System.String.Empty,并且 count 或 startIndex 为负数。- 或 - 当前实例不等于 System.String.Empty,
        //     ,和 startIndex 减去 count + 1 也不可小于零。
        [SecuritySafeCritical]
        public int LastIndexOfAny(char[] anyOf, int startIndex, int count);
        //
        // 摘要:
        //     报告在 Unicode 数组中指定的一个或多个字符在此实例中的最后一个匹配项的从零开始的索引的位置。 在指定的字符位置开始和在向后的右边该字符串的开头处理的搜索。
        //
        // 参数:
        //   anyOf:
        //     Unicode 字符数组,包含一个或多个要查找的字符。
        //
        //   startIndex:
        //     搜索起始位置。 从 startIndex 此实例的开头开始搜索。
        //
        // 返回结果:
        //     最后一次在此实例中找到 anyOf 中的任意字符的索引位置;如果未找到 anyOf 中的字符或者当前实例等于System.String.Empty,则为
        //     -1。
        //
        // 异常:
        //   T:System.ArgumentNullException:
        //     anyOf 为 null。
        //
        //   T:System.ArgumentOutOfRangeException:
        //     当前实例不等于 System.String.Empty,并且 startIndex 指定不在此实例内的位置。
        public int LastIndexOfAny(char[] anyOf, int startIndex);
        //
        // 摘要:
        //     返回一个新字符串,其文本值与此字符串相同,但其二进制表示形式符合指定的 Unicode 范式。
        //
        // 参数:
        //   normalizationForm:
        //     一个 Unicode 范式。
        //
        // 返回结果:
        //     一个新字符串,其文本值与此字符串相同,但其二进制表示形式符合由 normalizationForm 参数指定的范式。
        //
        // 异常:
        //   T:System.ArgumentException:
        //     当前实例包含无效的 Unicode 字符。
        [SecuritySafeCritical]
        public String Normalize(NormalizationForm normalizationForm);
        //
        // 摘要:
        //     返回一个新字符串,其文本值与此字符串相同,但其二进制表示形式符合 Unicode 范式 C。
        //
        // 返回结果:
        //     一个新的规范化字符串,其文本值与此字符串相同,但其二进制表示形式符合范式 C。
        //
        // 异常:
        //   T:System.ArgumentException:
        //     当前实例包含无效的 Unicode 字符。
        public String Normalize();
        //
        // 摘要:
        //     返回一个新字符串,该字符串通过在此实例中的字符左侧填充指定的 Unicode 字符来达到指定的总长度,从而使这些字符右对齐。
        //
        // 参数:
        //   totalWidth:
        //     结果字符串中的字符数,等于原始字符数加上任何其他填充字符。
        //
        //   paddingChar:
        //     Unicode 填充字符。
        //
        // 返回结果:
        //     与此实例等效的一个新字符串,但该字符串为右对齐,因此,在左侧填充所需任意数量的 paddingChar 字符,使长度达到 totalWidth。 但是,如果
        //     totalWidth 小于此实例的长度,则此方法返回对现有实例的引用。 如果 totalWidth 等于此实例的长度,则此方法返回与此实例相同的新字符串。
        //
        // 异常:
        //   T:System.ArgumentOutOfRangeException:
        //     totalWidth 小于零。
        public String PadLeft(int totalWidth, char paddingChar);
        //
        // 摘要:
        //     返回一个新字符串,该字符串通过在此实例中的字符左侧填充空格来达到指定的总长度,从而实现右对齐。
        //
        // 参数:
        //   totalWidth:
        //     结果字符串中的字符数,等于原始字符数加上任何其他填充字符。
        //
        // 返回结果:
        //     与此实例等效的一个新字符串,但该字符串为右对齐,因此,在左侧填充所需任意数量的空格,使长度达到 totalWidth。 但是,如果 totalWidth
        //     小于此实例的长度,则此方法返回对现有实例的引用。 如果 totalWidth 等于此实例的长度,则此方法返回与此实例相同的新字符串。
        //
        // 异常:
        //   T:System.ArgumentOutOfRangeException:
        //     totalWidth 小于零。
        public String PadLeft(int totalWidth);
        //
        // 摘要:
        //     返回一个新字符串,该字符串通过在此字符串中的字符右侧填充指定的 Unicode 字符来达到指定的总长度,从而使这些字符左对齐。
        //
        // 参数:
        //   totalWidth:
        //     结果字符串中的字符数,等于原始字符数加上任何其他填充字符。
        //
        //   paddingChar:
        //     Unicode 填充字符。
        //
        // 返回结果:
        //     与此实例等效的一个新字符串,但该字符串为左对齐,因此,在右侧填充所需任意数量的 paddingChar 字符,使长度达到 totalWidth。 但是,如果
        //     totalWidth 小于此实例的长度,则此方法返回对现有实例的引用。 如果 totalWidth 等于此实例的长度,则此方法返回与此实例相同的新字符串。
        //
        // 异常:
        //   T:System.ArgumentOutOfRangeException:
        //     totalWidth 小于零。
        public String PadRight(int totalWidth, char paddingChar);
        //
        // 摘要:
        //     返回一个新字符串,该字符串通过在此字符串中的字符右侧填充空格来达到指定的总长度,从而使这些字符左对齐。
        //
        // 参数:
        //   totalWidth:
        //     结果字符串中的字符数,等于原始字符数加上任何其他填充字符。
        //
        // 返回结果:
        //     与此实例等效的一个新字符串,但该字符串为左对齐,因此,在右侧填充所需任意数量的空格,使长度达到 totalWidth。 但是,如果 totalWidth
        //     小于此实例的长度,则此方法返回对现有实例的引用。 如果 totalWidth 等于此实例的长度,则此方法返回与此实例相同的新字符串。
        //
        // 异常:
        //   T:System.ArgumentOutOfRangeException:
        //     totalWidth 小于零。
        public String PadRight(int totalWidth);
        //
        // 摘要:
        //     返回指定数量字符在当前这个实例起始点在已删除的指定的位置的新字符串。
        //
        // 参数:
        //   startIndex:
        //     开始删除字符的从零开始的位置。
        //
        //   count:
        //     要删除的字符数。
        //
        // 返回结果:
        //     一个新字符串,除所删除的字符之外,该字符串与此实例等效。
        //
        // 异常:
        //   T:System.ArgumentOutOfRangeException:
        //     startIndex 或 count 小于零。- 或 - startIndex 加 count 指定此实例之外的位置。
        [SecuritySafeCritical]
        public String Remove(int startIndex, int count);
        //
        // 摘要:
        //     返回当前实例中从指定位置到最后位置的所有以删除的字符的新字符串。
        //
        // 参数:
        //   startIndex:
        //     开始删除字符的从零开始的位置。
        //
        // 返回结果:
        //     一个新字符串,除所删除的字符之外,该字符串与此字符串等效。
        //
        // 异常:
        //   T:System.ArgumentOutOfRangeException:
        //     startIndex 小于零。- 或 - startIndex 指定不在此字符串中的位置。
        public String Remove(int startIndex);
        //
        // 摘要:
        //     返回一个新字符串,其中此实例中出现的所有指定 Unicode 字符都替换为另一个指定的 Unicode 字符。
        //
        // 参数:
        //   oldChar:
        //     要替换的 Unicode 字符。
        //
        //   newChar:
        //     要替换出现的所有 oldChar 的 Unicode 字符。
        //
        // 返回结果:
        //     等效于此实例(除了 oldChar 的所有实例都已替换为 newChar 外)的字符串。 如果在当前实例中找不到 oldChar,此方法返回未更改的当前实例。
        public String Replace(char oldChar, char newChar);
        //
        // 摘要:
        //     返回一个新字符串,其中当前实例中出现的所有指定字符串都替换为另一个指定的字符串。
        //
        // 参数:
        //   oldValue:
        //     要替换的字符串。
        //
        //   newValue:
        //     要替换 oldValue 的所有匹配项的字符串。
        //
        // 返回结果:
        //     等效于当前字符串(除了 oldValue 的所有实例都已替换为 newValue 外)的字符串。 如果在当前实例中找不到 oldValue,此方法返回未更改的当前实例。
        //
        // 异常:
        //   T:System.ArgumentNullException:
        //     oldValue 为 null。
        //
        //   T:System.ArgumentException:
        //     oldValue 为空字符串 ("")。
        [TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
        public String Replace(String oldValue, String newValue);
        //
        // 摘要:
        //     基于数组中的字符将一个字符串拆分成最大数量的子字符串。
        //
        // 参数:
        //   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(char[] separator, int count, 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);
        //
        // 摘要:
        //     基于数组中的字符串将一个字符串拆分成最大数量的子字符串。 可以指定子字符串是否包含空数组元素。
        //
        // 参数:
        //   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);
        //
        // 摘要:
        //     基于数组中的字符将一个字符串拆分成最大数量的子字符串。 也可指定要返回的子字符串的最大数量。
        //
        // 参数:
        //   separator:
        //     分隔此字符串中子字符串的字符数组、不包含分隔符的空数组或 null。
        //
        //   count:
        //     要返回的子字符串的最大数量。
        //
        // 返回结果:
        //     一个数组,其元素包含此实例中的子字符串,这些子字符串由 separator 中的一个或多个字符分隔。 有关详细信息,请参阅“备注”部分。
        //
        // 异常:
        //   T:System.ArgumentOutOfRangeException:
        //     count 为负数。
        public String[] Split(char[] separator, int count);
        //
        // 摘要:
        //     基于数组中的字符将字符串拆分为多个子字符串。
        //
        // 参数:
        //   separator:
        //     分隔此字符串中子字符串的字符数组、不包含分隔符的空数组或 null。
        //
        // 返回结果:
        //     一个数组,其元素包含此实例中的子字符串,这些子字符串由 separator 中的一个或多个字符分隔。 有关详细信息,请参阅“备注”部分。
        public String[] Split(params char[] separator);
        //
        // 摘要:
        //     基于数组中的字符将字符串拆分为多个子字符串。 可以指定子字符串是否包含空数组元素。
        //
        // 参数:
        //   separator:
        //     分隔此字符串中子字符串的字符数组、不包含分隔符的空数组或 null。
        //
        //   options:
        //     要省略返回的数组中的空数组元素,则为 System.StringSplitOptions.RemoveEmptyEntries;要包含返回的数组中的空数组元素,则为
        //     System.StringSplitOptions.None。
        //
        // 返回结果:
        //     一个数组,其元素包含此字符串中的子字符串,这些子字符串由 separator 中的一个或多个字符分隔。 有关详细信息,请参阅“备注”部分。
        //
        // 异常:
        //   T:System.ArgumentException:
        //     options 不是 System.StringSplitOptions 值之一。
        [ComVisible(false)]
        public String[] Split(char[] separator, StringSplitOptions options);
        //
        // 摘要:
        //     确定在使用指定的比较选项进行比较时此字符串实例的开头是否与指定的字符串匹配。
        //
        // 参数:
        //   value:
        //     要比较的字符串。
        //
        //   comparisonType:
        //     枚举值之一,用于确定如何比较此字符串与 value。
        //
        // 返回结果:
        //     如果此实例以 true 开头,则为 value;否则为 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,则使用当前区域性。
        //
        // 返回结果:
        //     如果 true 参数与此字符串的开头匹配,则为 value;否则为 false。
        //
        // 异常:
        //   T:System.ArgumentNullException:
        //     value 为 null。
        public bool StartsWith(String value, bool ignoreCase, CultureInfo culture);
        //
        // 摘要:
        //     确定此字符串实例的开头是否与指定的字符串匹配。
        //
        // 参数:
        //   value:
        //     要比较的字符串。
        //
        // 返回结果:
        //     如果 true 与此字符串的开头匹配,则为 value;否则为 false。
        //
        // 异常:
        //   T:System.ArgumentNullException:
        //     value 为 null。
        [TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
        public bool StartsWith(String value);
        //
        // 摘要:
        //     从此实例检索子字符串。 子字符串从指定的字符位置开始且具有指定的长度。
        //
        // 参数:
        //   startIndex:
        //     此实例中子字符串的起始字符位置(从零开始)。
        //
        //   length:
        //     子字符串中的字符数。
        //
        // 返回结果:
        //     与此实例中在 length 处开头、长度为 startIndex 的子字符串等效的一个字符串;如果 System.String.Empty 等于此实例的长度且
        //     startIndex 为零,则为 length。
        //
        // 异常:
        //   T:System.ArgumentOutOfRangeException:
        //     startIndex 加 length 指示不在此实例内的位置。- 或 - startIndex 或 length 小于零。
        [SecuritySafeCritical]
        [TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
        public String Substring(int startIndex, int length);
        //
        // 摘要:
        //     从此实例检索子字符串。 子字符串在指定的字符位置开始并一直到该字符串的末尾。
        //
        // 参数:
        //   startIndex:
        //     此实例中子字符串的起始字符位置(从零开始)。
        //
        // 返回结果:
        //     与此实例中在 startIndex 处开头的子字符串等效的一个字符串;如果 System.String.Empty 等于此实例的长度,则为 startIndex。
        //
        // 异常:
        //   T:System.ArgumentOutOfRangeException:
        //     startIndex 小于零或大于此实例的长度。
        [TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
        public String Substring(int startIndex);
        //
        // 摘要:
        //     将此实例中的字符复制到 Unicode 字符数组。
        //
        // 返回结果:
        //     元素为此实例的各字符的 Unicode 字符数组。 如果此实例是空字符串,则返回的数组为空且长度为零。
        [SecuritySafeCritical]
        public char[] ToCharArray();
        //
        // 摘要:
        //     将此实例中的指定子字符串内的字符复制到 Unicode 字符数组。
        //
        // 参数:
        //   startIndex:
        //     此实例内子字符串的起始位置。
        //
        //   length:
        //     此实例内子字符串的长度。
        //
        // 返回结果:
        //     元素为此实例中从字符位置 length 开始的 startIndex 字符数的 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 的此实例;不执行实际转换。
        //
        // 参数:
        //   provider:
        //     (保留)一个对象,用于提供区域性特定的格式设置信息。
        //
        // 返回结果:
        //     当前的字符串。
        [TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
        public String ToString(IFormatProvider provider);
        //
        // 摘要:
        //     返回 System.String 的此实例;不执行实际转换。
        //
        // 返回结果:
        //     当前的字符串。
        [TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
        public override String ToString();
        //
        // 摘要:
        //     根据指定区域性的大小写规则返回此字符串转换为大写形式的副本。
        //
        // 参数:
        //   culture:
        //     一个对象,用于提供区域性特定的大小写规则。
        //
        // 返回结果:
        //     当前字符串的大写形式。
        //
        // 异常:
        //   T:System.ArgumentNullException:
        //     culture 为 null。
        [TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
        public String ToUpper(CultureInfo culture);
        //
        // 摘要:
        //     返回此字符串转换为大写形式的副本。
        //
        // 返回结果:
        //     当前字符串的大写形式。
        public String ToUpper();
        //
        // 摘要:
        //     返回此 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。
        //
        // 返回结果:
        //     如果 true 的值与 a 的值相同,则为 b;否则为 false。
        [TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
        public static bool operator ==(String a, String b);
        //
        // 摘要:
        //     确定两个指定的字符串是否具有不同的值。
        //
        // 参数:
        //   a:
        //     要比较的第一个字符串,或 null。
        //
        //   b:
        //     要比较的第二个字符串,或 null。
        //
        // 返回结果:
        //     如果 true 的值与 a 的值不同,则为 b;否则为 false。
        [TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
        public static bool operator !=(String a, String b);
    }
}
2、
2.返回顶部
 
3.返回顶部
 
4.返回顶部
 
5.返回顶部
 
 
6.返回顶部
 
warn作者:ylbtech
出处:http://ylbtech.cnblogs.com/
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。

转载于:https://www.cnblogs.com/storebook/p/9061965.html

排查结果如下: 1.使用mvn dependency:tree返回如下信息: [INFO] --- maven-dependency-plugin:3.1.2:tree (default-cli) @ zysygh --- [INFO] com.ghzy:zysygh:jar:0.1.196 [INFO] +- org.springframework.boot:spring-boot-starter-data-redis:jar:2.2.13.RELEASE:compile [INFO] | +- org.springframework.boot:spring-boot-starter:jar:2.2.13.RELEASE:compile [INFO] | | +- org.springframework.boot:spring-boot:jar:2.2.13.RELEASE:compile [INFO] | | +- org.springframework.boot:spring-boot-autoconfigure:jar:2.2.13.RELEASE:compile [INFO] | | +- jakarta.annotation:jakarta.annotation-api:jar:1.3.5:compile [INFO] | | \- org.yaml:snakeyaml:jar:1.25:runtime [INFO] | +- org.springframework.data:spring-data-redis:jar:2.2.12.RELEASE:compile [INFO] | | +- org.springframework.data:spring-data-keyvalue:jar:2.2.12.RELEASE:compile [INFO] | | | \- org.springframework.data:spring-data-commons:jar:2.2.12.RELEASE:compile [INFO] | | +- org.springframework:spring-tx:jar:5.2.12.RELEASE:compile [INFO] | | +- org.springframework:spring-oxm:jar:5.2.12.RELEASE:compile [INFO] | | \- org.springframework:spring-aop:jar:5.2.12.RELEASE:compile [INFO] | \- io.lettuce:lettuce-core:jar:5.2.2.RELEASE:compile [INFO] | +- io.netty:netty-common:jar:4.1.58.Final:compile [INFO] | +- io.netty:netty-handler:jar:4.1.58.Final:compile [INFO] | | +- io.netty:netty-resolver:jar:4.1.58.Final:compile [INFO] | | +- io.netty:netty-buffer:jar:4.1.58.Final:compile [INFO] | | \- io.netty:netty-codec:jar:4.1.58.Final:compile [INFO] | +- io.netty:netty-transport:jar:4.1.58.Final:compile [INFO] | \- io.projectreactor:reactor-core:jar:3.3.13.RELEASE:compile [INFO] | \- org.reactivestreams:reactive-streams:jar:1.0.3:compile [INFO] +- org.springframework.boot:spring-boot-starter-mail:jar:2.2.13.RELEASE:compile [INFO] | +- org.springframework:spring-context-support:jar:5.2.12.RELEASE:compile [INFO] | | +- org.springframework:spring-beans:jar:5.2.12.RELEASE:compile [INFO] | | \- org.springframework:spring-context:jar:5.2.12.RELEASE:compile [INFO] | \- com.sun.mail:jakarta.mail:jar:1.6.5:compile [INFO] | \- com.sun.activation:jakarta.activation:jar:1.2.2:compile [INFO] +- org.springframework.boot:spring-boot-starter-thymeleaf:jar:2.2.13.RELEASE:compile [INFO] | +- org.thymeleaf:thymeleaf-spring5:jar:3.0.12.RELEASE:compile [INFO] | | \- org.thymeleaf:thymeleaf:jar:3.0.12.RELEASE:compile [INFO] | | +- org.attoparser:attoparser:jar:2.0.5.RELEASE:compile [INFO] | | \- org.unbescape:unbescape:jar:1.1.6.RELEASE:compile [INFO] | \- org.thymeleaf.extras:thymeleaf-extras-java8time:jar:3.0.4.RELEASE:compile [INFO] +- org.springframework.boot:spring-boot-starter-web:jar:2.2.13.RELEASE:compile [INFO] | +- org.springframework.boot:spring-boot-starter-json:jar:2.2.13.RELEASE:compile [INFO] | | +- com.fasterxml.jackson.datatype:jackson-datatype-jdk8:jar:2.10.5:compile [INFO] | | +- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:jar:2.10.5:compile [INFO] | | \- com.fasterxml.jackson.module:jackson-module-parameter-names:jar:2.10.5:compile [INFO] | +- org.springframework.boot:spring-boot-starter-tomcat:jar:2.2.13.RELEASE:compile [INFO] | | +- org.apache.tomcat.embed:tomcat-embed-core:jar:9.0.41:compile [INFO] | | +- org.apache.tomcat.embed:tomcat-embed-el:jar:9.0.41:compile [INFO] | | \- org.apache.tomcat.embed:tomcat-embed-websocket:jar:9.0.41:compile [INFO] | +- org.springframework.boot:spring-boot-starter-validation:jar:2.2.13.RELEASE:compile [INFO] | | +- jakarta.validation:jakarta.validation-api:jar:2.0.2:compile [INFO] | | \- org.hibernate.validator:hibernate-validator:jar:6.0.22.Final:compile [INFO] | | +- org.jboss.logging:jboss-logging:jar:3.4.1.Final:compile [INFO] | | \- com.fasterxml:classmate:jar:1.5.1:compile [INFO] | +- org.springframework:spring-web:jar:5.2.12.RELEASE:compile [INFO] | \- org.springframework:spring-webmvc:jar:5.2.12.RELEASE:compile [INFO] | \- org.springframework:spring-expression:jar:5.2.12.RELEASE:compile [INFO] +- org.mybatis.spring.boot:mybatis-spring-boot-starter:jar:2.3.2:compile [INFO] | +- org.springframework.boot:spring-boot-starter-jdbc:jar:2.2.13.RELEASE:compile [INFO] | | +- com.zaxxer:HikariCP:jar:3.4.5:compile [INFO] | | \- org.springframework:spring-jdbc:jar:5.2.12.RELEASE:compile [INFO] | +- org.mybatis.spring.boot:mybatis-spring-boot-autoconfigure:jar:2.3.2:compile [INFO] | \- org.mybatis:mybatis-spring:jar:2.1.2:compile [INFO] +- org.springframework.boot:spring-boot-starter-logging:jar:2.2.13.RELEASE:compile [INFO] | +- ch.qos.logback:logback-classic:jar:1.2.3:compile [INFO] | | \- ch.qos.logback:logback-core:jar:1.2.3:compile [INFO] | \- org.slf4j:jul-to-slf4j:jar:1.7.30:compile [INFO] +- mysql:mysql-connector-java:jar:8.0.26:runtime [INFO] +- org.projectlombok:lombok:jar:1.18.16:compile (optional) [INFO] +- org.springframework.boot:spring-boot-starter-test:jar:2.2.13.RELEASE:test [INFO] | +- org.springframework.boot:spring-boot-test:jar:2.2.13.RELEASE:test [INFO] | +- org.springframework.boot:spring-boot-test-autoconfigure:jar:2.2.13.RELEASE:test [INFO] | +- com.jayway.jsonpath:json-path:jar:2.4.0:test [INFO] | | \- net.minidev:json-smart:jar:2.3:test [INFO] | | \- net.minidev:accessors-smart:jar:1.2:test [INFO] | | \- org.ow2.asm:asm:jar:5.0.4:test [INFO] | +- jakarta.xml.bind:jakarta.xml.bind-api:jar:2.3.3:test [INFO] | | \- jakarta.activation:jakarta.activation-api:jar:1.2.2:test [INFO] | +- org.junit.jupiter:junit-jupiter:jar:5.5.2:test [INFO] | | +- org.junit.jupiter:junit-jupiter-api:jar:5.5.2:test [INFO] | | | +- org.opentest4j:opentest4j:jar:1.2.0:test [INFO] | | | \- org.junit.platform:junit-platform-commons:jar:1.5.2:test [INFO] | | +- org.junit.jupiter:junit-jupiter-params:jar:5.5.2:test [INFO] | | \- org.junit.jupiter:junit-jupiter-engine:jar:5.5.2:test [INFO] | +- org.junit.vintage:junit-vintage-engine:jar:5.5.2:test [INFO] | | +- org.apiguardian:apiguardian-api:jar:1.1.0:test [INFO] | | +- org.junit.platform:junit-platform-engine:jar:1.5.2:test [INFO] | | \- junit:junit:jar:4.12:test [INFO] | +- org.mockito:mockito-junit-jupiter:jar:3.1.0:test [INFO] | +- org.assertj:assertj-core:jar:3.13.2:test [INFO] | +- org.hamcrest:hamcrest:jar:2.1:test [INFO] | +- org.mockito:mockito-core:jar:3.1.0:test [INFO] | | +- net.bytebuddy:byte-buddy:jar:1.10.19:test [INFO] | | +- net.bytebuddy:byte-buddy-agent:jar:1.10.19:test [INFO] | | \- org.objenesis:objenesis:jar:2.6:test [INFO] | +- org.skyscreamer:jsonassert:jar:1.5.0:test [INFO] | | \- com.vaadin.external.google:android-json:jar:0.0.20131108.vaadin1:test [INFO] | +- org.springframework:spring-core:jar:5.2.12.RELEASE:compile [INFO] | | \- org.springframework:spring-jcl:jar:5.2.12.RELEASE:compile [INFO] | +- org.springframework:spring-test:jar:5.2.12.RELEASE:test [INFO] | \- org.xmlunit:xmlunit-core:jar:2.6.4:test [INFO] +- com.aliyun:aliyun-java-sdk-core:jar:4.5.3:compile [INFO] | +- com.google.code.gson:gson:jar:2.8.6:compile [INFO] | +- org.apache.httpcomponents:httpclient:jar:4.5.13:compile [INFO] | | \- commons-codec:commons-codec:jar:1.13:compile [INFO] | +- org.apache.httpcomponents:httpcore:jar:4.4.14:compile [INFO] | +- commons-logging:commons-logging:jar:1.2:compile [INFO] | +- javax.xml.bind:jaxb-api:jar:2.3.1:compile [INFO] | | \- javax.activation:javax.activation-api:jar:1.2.0:compile [INFO] | +- org.jacoco:org.jacoco.agent:jar:runtime:0.8.5:compile [INFO] | +- org.ini4j:ini4j:jar:0.5.4:compile [INFO] | +- org.slf4j:slf4j-api:jar:1.7.30:compile [INFO] | +- io.opentracing:opentracing-api:jar:0.33.0:compile [INFO] | \- io.opentracing:opentracing-util:jar:0.33.0:compile [INFO] | \- io.opentracing:opentracing-noop:jar:0.33.0:compile [INFO] +- com.aliyun:dysmsapi20170525:jar:4.1.0:compile [INFO] | +- com.aliyun:tea-util:jar:0.2.23:compile [INFO] | +- com.aliyun:endpoint-util:jar:0.0.7:compile [INFO] | +- com.aliyun:tea:jar:1.3.1:compile [INFO] | | \- com.squareup.okhttp3:okhttp:jar:3.14.9:compile [INFO] | | \- com.squareup.okio:okio:jar:1.17.2:compile [INFO] | +- com.aliyun:tea-openapi:jar:0.3.8:compile [INFO] | | +- com.aliyun:credentials-java:jar:1.0.1:compile [INFO] | | | \- com.aliyun:credentials-api:jar:1.0.0:compile [INFO] | | +- com.aliyun:alibabacloud-gateway-spi:jar:0.0.2:compile [INFO] | | \- com.aliyun:tea-xml:jar:0.1.6:compile [INFO] | | \- org.dom4j:dom4j:jar:2.0.3:compile [INFO] | \- com.aliyun:openapiutil:jar:0.2.2:compile [INFO] | \- org.bouncycastle:bcprov-jdk18on:jar:1.78.1:compile [INFO] +- com.alibaba:fastjson:jar:1.2.75:compile [INFO] +- org.mybatis:mybatis:jar:3.5.9:compile [INFO] +- org.jetbrains:annotations:jar:13.0:compile [INFO] +- org.springframework.boot:spring-boot-configuration-processor:jar:2.2.13.RELEASE:compile (optional) [INFO] +- redis.clients:jedis:jar:3.1.0:compile [INFO] | \- org.apache.commons:commons-pool2:jar:2.7.0:compile [INFO] +- io.jsonwebtoken:jjwt-api:jar:0.11.5:compile [INFO] +- io.jsonwebtoken:jjwt-impl:jar:0.11.5:runtime [INFO] \- io.jsonwebtoken:jjwt-jackson:jar:0.11.5:runtime [INFO] \- com.fasterxml.jackson.core:jackson-databind:jar:2.10.5.1:compile [INFO] +- com.fasterxml.jackson.core:jackson-annotations:jar:2.10.5:compile [INFO] \- com.fasterxml.jackson.core:jackson-core:jar:2.10.5:compile [INFO] ------------------------------------------------------------------------ 2.applicaion.properties中的配置内容为logging.config=classpath:logback-spring.xml 3.src/main/resources目录下存在logback-spring.xml文件,但之前里面没有那两行<include>配置项,现已添加。
最新发布
07-19
<think>我们之前已经排除了log4j的依赖,并且确认了依赖树中没有log4j,但是问题依然存在。 现在,根据新的排查结果: 1. 依赖树中确实没有log4j相关的依赖,只有logback和slf4j。 2. 在application.properties中配置了`logging.config=classpath:logback-spring.xml`,指向Logback的配置。 3. 在src/main/resources下已经存在logback-spring.xml,并且已经添加了<include>配置。 但是,错误信息仍然显示在尝试初始化日志系统时,它去查找`log4j-spring.xml`,而不是使用Logback。 这可能是由于Spring Boot的日志初始化顺序问题。在Spring Boot启动的早期,日志系统需要被初始化,而在这个阶段,`application.properties`中的配置可能还没有被加载。因此,我们设置的`logging.config`可能没有在日志系统初始化之前生效。 解决方案: 1. 使用`spring.xml`后缀的配置文件:Spring Boot对`logback-spring.xml`有特殊处理,它会在Spring环境完全初始化后才加载,这样可以使用Spring的属性配置。但是,在Spring环境初始化之前,日志系统需要先初始化,所以这个文件可能没有被及时使用。 2. 尝试使用默认的日志配置文件名称:将配置文件命名为`logback.xml`(不带`-spring`),并移除`application.properties`中的`logging.config`配置。这样,Spring Boot会在classpath中查找`logback.xml`并在启动早期初始化日志系统。 3. 或者,将配置放在`logback.xml`中,并在`logback.xml`中通过`<springProperty>`标签引入Spring属性(如果需要)。 4. 确保没有其他地方的配置覆盖了日志配置。 步骤: a. 将`src/main/resources/logback-spring.xml`重命名为`logback.xml`。 b. 删除`application.properties`中的`logging.config=classpath:logback-spring.xml`这一行(避免重复指定)。 c. 清理并重新打包项目,然后部署。 为什么这样做? 因为Spring Boot在启动时,会按以下顺序查找日志配置: - 首先,检查系统属性`logging.config`(这通常由`application.properties`中的`logging.config`设置,但在加载属性文件之前,日志系统需要初始化,所以这会导致循环问题)。 - 然后,在classpath中查找`logback-spring.xml`(但需要Spring环境,所以初始化较晚)。 - 而`logback.xml`(不带`-spring`)会被Logback自动加载,且不需要Spring环境,因此可以在更早的阶段初始化。 因此,使用`logback.xml`可以让日志系统在Spring Boot启动的最初阶段就正确初始化,而不会去尝试加载log4j的配置。 如果问题仍然存在,可以在`logback.xml`中增加一个简单的配置,确保它被正确加载,例如: ```xml <configuration> <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> <encoder> <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern> </encoder> </appender> <root level="INFO"> <appender-ref ref="STDOUT" /> </root> </configuration> ``` 另外,检查一下是否在代码中通过系统属性设置了`logging.config`,例如在`main`方法中: ```java public static void main(String[] args) { System.setProperty("logging.config", "classpath:log4j-spring.xml"); // 确保没有这样的代码 SpringApplication.run(Application.class, args); } ``` 如果以上步骤都做了还是不行,可以考虑在启动命令中增加参数来指定日志配置(但一般不推荐,因为问题应该从项目内部解决): ```bash java -jar your-app.jar --logging.config=classpath:logback.xml ``` 但是,根据我们的调整,应该不需要这样做。 最后,如果以上方法都不能解决问题,那么可能是由于某些依赖库在内部强制设置了日志系统(例如使用了Log4j的桥接器),但根据依赖树,我们没有看到log4j的依赖,所以这种可能性较小。 让我们重新整理一下步骤: 1. 重命名配置文件:将`logback-spring.xml`改为`logback.xml`。 2. 移除`application.properties`中的`logging.config`配置项。 3. 确保`logback.xml`中有基本的配置(至少包含一个控制台输出)。 4. 清理项目并重新打包。 5. 检查打包后的jar文件中,`logback.xml`是否在根目录下(即`BOOT-INF/classes/logback.xml`)。 6. 运行jar文件,观察日志。 如果问题解决,那么就是日志初始化顺序的问题。如果仍然出现同样的错误,那么我们需要进一步排查。 另外,注意一个细节:在错误堆栈中,我们看到的是: `org.springframework.boot.logging.logback.LogbackLoggingSystem.loadConfiguration` 它试图加载`log4j-spring.xml`?这很奇怪,因为`LogbackLoggingSystem`是Logback的日志系统,它不应该去加载log4j的配置。 因此,另一种可能是:在应用启动过程中,有多个日志系统被尝试初始化。Spring Boot会尝试加载多个日志系统(按Logback、Log4j2、Java Util Logging的顺序),直到找到一个可用的。但是,在依赖中我们已经排除了log4j,所以它应该不会去尝试Log4j。 然而,错误信息中显示的是`Logging system failed to initialize using configuration from 'classpath:log4j-spring.xml'`,这可能是由于在初始化Logback时发生了错误,然后回退到Log4j?但是根据依赖,我们并没有Log4j,所以这个尝试会失败。 所以,我们还需要检查`logback.xml`的配置是否正确,避免Logback初始化失败。 因此,在修改配置后,请确保Logback能正确初始化。可以在`logback.xml`中增加一个调试信息,或者使用最简单的配置。 总结:先尝试重命名和移除配置项,确保Logback在早期正确初始化。 如果问题依旧,请提供新的错误日志。</think>### 问题分析与解决方案 根据您提供的依赖树和配置信息,问题核心在于**日志系统初始化顺序冲突**。虽然已排除Log4j依赖并配置Logback,但Spring Boot仍在尝试加载Log4j配置。以下是具体原因和解决方案: #### 根本原因: 1. **依赖冲突**:`com.aliyun:aliyun-java-sdk-core` 引入了 `javax.xml.bind:jaxb-api` 和 `org.slf4j:slf4j-api`,但未明确排除旧版日志桥接器 2. **初始化顺序**:Spring Boot在加载`application.properties`之前初始化日志系统 3. **配置残留**:可能存在环境变量或系统属性强制指定Log4j --- ### 解决方案 #### 1. 强制指定日志系统(关键步骤) 在 `src/main/resources` 下创建 `spring.properties` 文件: ```properties # 强制使用Logback,禁止自动检测其他日志框架 logging.system=logback ``` #### 2. 修复依赖冲突 在 `pom.xml` 中添加显式排除: ```xml <dependency> <groupId>com.aliyun</groupId> <artifactId>aliyun-java-sdk-core</artifactId> <exclusions> <!-- 排除旧版SLF4J实现 --> <exclusion> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> </exclusion> <!-- 排除可能引起冲突的XML库 --> <exclusion> <groupId>javax.xml.bind</groupId> <artifactId>jaxb-api</artifactId> </exclusion> </exclusions> </dependency> ``` #### 3. 增强Logback配置 更新 `logback-spring.xml` 确保完全自包含: ```xml <?xml version="1.0" encoding="UTF-8"?> <configuration scan="true" scanPeriod="30 seconds"> <!-- 禁用服务发现,避免加载外部配置 --> <contextName>local</contextName> <!-- 控制台输出 --> <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender"> <encoder> <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern> </encoder> </appender> <!-- 根日志级别 --> <root level="INFO"> <appender-ref ref="CONSOLE" /> </root> <!-- 重要:禁用Spring Boot的默认配置加载 --> <include resource="org/springframework/boot/logging/logback/base.xml" optional="true"/> </configuration> ``` #### 4. 添加日志初始化监听器 在 `src/main/resources/META-INF` 下创建 `spring.factories` 文件: ```properties # 提前初始化日志系统 org.springframework.context.ApplicationListener=\ org.springframework.boot.context.config.DelegatingApplicationListener,\ org.springframework.boot.context.logging.LoggingApplicationListener ``` #### 5. 验证打包结果 在打包后执行以下检查: ```bash # 检查日志配置是否包含 unzip -l target/zysygh.jar | grep -E 'logback-spring.xml|spring.factories|spring.properties' # 检查依赖冲突 mvn dependency:tree -Dincludes=org.slf4j,ch.qos.logback ``` --- ### 原理解释 Spring Boot日志初始化流程存在以下敏感点: ```mermaid graph LR A[启动JVM] --> B[读取spring.factories] B --> C[LoggingApplicationListener] C --> D{检测日志系统类型} D -->|系统属性| E[使用指定日志框架] D -->|自动检测| F[扫描classpath] F --> G[找到logback-classic] G --> H[加载logback-spring.xml] F --> I[发现slf4j-log4j痕迹] --> J[尝试加载log4j配置] ``` 您遇到的错误发生在 **步骤J**,因为: 1. Aliyun SDK引入了`slf4j-api`但未提供实现 2. 类路径中存在`org.slf4j.impl.StaticLoggerBinder`的旧版本 3. Spring误判需要加载Log4j --- ### 部署验证 在宝塔面板重启应用后,检查日志开头应出现: ``` 2023-08-01 12:00:00.000 [main] INFO o.s.b.StartupInfoLogger - Starting ZysyghApplication on bt-server with PID 12345 ``` 如果仍有问题,添加JVM参数: ```bash -Dorg.springframework.boot.logging.LoggingSystem=none ``` ---
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值