• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C#String类

原作者: [db:作者] 来自: [db:来源] 收藏 邀请
                            Name Description
String(Char*) Initializes a new instance of the String class to the value indicated by a specified pointer to an array of Unicode characters.
String(Char[]) Initializes a new instance of the String class to the value indicated by an array of Unicode characters.
String(SByte*) Initializes a new instance of the String class to the value indicated by a pointer to an array of 8-bit signed integers.
String(Char, Int32) Initializes a new instance of the String class to the value indicated by a specified Unicode character repeated a specified number of times.
String(Char*, Int32, Int32) Initializes a new instance of the String class to the value indicated by a specified pointer to an array of Unicode characters, a starting character position within that array, and a length.
String(Char[], Int32, Int32) Initializes a new instance of the String class to the value indicated by an array of Unicode characters, a starting character position within that array, and a length.
String(SByte*, Int32, Int32) Initializes a new instance of the String class to the value indicated by a specified pointer to an array of 8-bit signed integers, a starting position within that array, and a length.
String(SByte*, Int32, Int32, Encoding) Initializes a new instance of the String class to the value indicated by a specified pointer to an array of 8-bit signed integers, a starting position within that array, a length, and an Encoding object.
Top
                            Name Description
Chars Gets the Char object at a specified position in the current String object.
Length Gets the number of characters in the current String object.
Top
                            Name Description
Clone Returns a reference to this instance of String.
Compare(String, String) Compares two specified String objects and returns an integer that indicates their relative position in the sort order.
Compare(String, String, Boolean) Compares two specified String objects, ignoring or honoring their case, and returns an integer that indicates their relative position in the sort order.
Compare(String, String, StringComparison) Compares two specified String objects using the specified rules, and returns an integer that indicates their relative position in the sort order.
Compare(String, String, Boolean, CultureInfo) Compares two specified String objects, ignoring or honoring their case, and using culture-specific information to influence the comparison, and returns an integer that indicates their relative position in the sort order.
Compare(String, String, CultureInfo, CompareOptions) Compares two specified String objects using the specified comparison options and culture-specific information to influence the comparison, and returns an integer that indicates the relationship of the two strings to each other in the sort order.
Compare(String, Int32, String, Int32, Int32) Compares substrings of two specified String objects and returns an integer that indicates their relative position in the sort order.
Compare(String, Int32, String, Int32, Int32, Boolean) Compares substrings of two specified String objects, ignoring or honoring their case, and returns an integer that indicates their relative position in the sort order.
Compare(String, Int32, String, Int32, Int32, StringComparison) Compares substrings of two specified String objects using the specified rules, and returns an integer that indicates their relative position in the sort order.
Compare(String, Int32, String, Int32, Int32, Boolean, CultureInfo) Compares substrings of two specified String objects, ignoring or honoring their case and using culture-specific information to influence the comparison, and returns an integer that indicates their relative position in the sort order.
Compare(String, Int32, String, Int32, Int32, CultureInfo, CompareOptions) Compares substrings of two specified String objects using the specified comparison options and culture-specific information to influence the comparison, and returns an integer that indicates the relationship of the two substrings to each other in the sort order.
CompareOrdinal(String, String) Compares two specified String objects by evaluating the numeric values of the corresponding Char objects in each string.
CompareOrdinal(String, Int32, String, Int32, Int32) Compares substrings of two specified String objects by evaluating the numeric values of the corresponding Char objects in each substring.
CompareTo(Object) Compares this instance with a specified Object and indicates whether this instance precedes, follows, or appears in the same position in the sort order as the specified Object.
CompareTo(String) Compares this instance with a specified String object and indicates whether this instance precedes, follows, or appears in the same position in the sort order as the specified String.
Concat(Object) Creates the string  representation of a specified object.
Concat(Object[]) Concatenates the string representations of the elements in a specified Object array.
Concat(IEnumerable<String>) Concatenates the members of a constructed IEnumerable<T> collection of type String.
Concat(String[]) Concatenates the elements of a specified String array.
Concat(Object, Object) Concatenates the string representations of two specified objects.
Concat(String, String) Concatenates two specified instances of String.
Concat(Object, Object, Object) Concatenates the string representations of three specified objects.
Concat(String, String, String) Concatenates three specified instances of String.
Concat(Object, Object, Object, Object) Concatenates the string representations of four specified objects and any objects specified in an optional variable length parameter list.
Concat(String, String, String, String) Concatenates four specified instances of String.
Concat<T>(IEnumerable<T>) Concatenates the members of an IEnumerable<T> implementation.
Contains Returns a value indicating whether the specified String object occurs within this string.
Copy Creates a new instance of String with the same value as a specified String.
CopyTo Copies a specified number of characters from a specified position in this instance to a specified position in an array of Unicode characters.
EndsWith(String) Determines whether the end of this string instance matches the specified string.
EndsWith(String, StringComparison) Determines whether the end of this string instance matches the specified string when compared using the specified comparison option.
EndsWith(String, Boolean, CultureInfo) Determines whether the end of this string instance matches the specified string when compared using the specified culture.
Equals(Object) Determines whether this instance and a specified object, which must also be a String object, have the same value. (Overrides Object.Equals(Object).)
Equals(String) Determines whether this instance and another specified String object have the same value.
Equals(String, String) Determines whether two specified String objects have the same value.
Equals(String, StringComparison) Determines whether this string and a specified String object have the same value. A parameter specifies the culture, case, and sort rules used in the comparison.
Equals(String, String, StringComparison) Determines whether two specified String objects have the same value. A parameter specifies the culture, case, and sort rules used in the comparison.
Format(String, Object) Replaces one or more format items in a specified string with the string representation of a specified object.
Format(String, Object[]) Replaces the format item in a specified string with the string representation of a corresponding object in a specified array.
Format(IFormatProvider, String, Object[]) Replaces the format items in a specified string with the string representations of corresponding objects in a specified array. A parameter supplies culture-specific formatting information.
Format(String, Object, Object) Replaces the format items in a specified string with the string representation of two specified objects.
Format(String, Object, Object, Object) Replaces the format items in a specified string with the string representation of three specified objects.
GetEnumerator Retrieves an object that can iterate through the individual characters in this string.
GetHashCode Returns the hash code for this string. (Overrides Object.GetHashCode().)
GetType Gets the Type of the current instance. (Inherited from Object.)
GetTypeCode Returns the TypeCode for class String.
IndexOf(Char) Reports the zero-based index of the first occurrence of the specified Unicode character in this string.
IndexOf(String) Reports the zero-based index of the first occurrence of the specified string in this instance.
IndexOf(Char, Int32) Reports the zero-based index of the first occurrence of the specified Unicode character in this string. The search starts at a specified character position.
IndexOf(String, Int32) Reports the zero-based index of the first occurrence of the specified string in this instance. The search starts at a specified character position.
IndexOf(String, StringComparison) Reports the zero-based index of the first occurrence of the specified string in the current String object. A parameter specifies the type of search to use for the specified string.
IndexOf(Char, Int32, Int32) Reports the zero-based index of the first occurrence of the specified character in this instance. The search starts at a specified character position and examines a specified number of character positions.
IndexOf(String, Int32, Int32) Reports the zero-based index of the first occurrence of the specified string in this instance. The search starts at a specified character position and examines a specified number of character positions.
IndexOf(String, Int32, StringComparison) Reports the zero-based index of the first occurrence of the specified string in the current String object. Parameters specify the starting search position in the current string and the type of search to use for the specified string.
IndexOf(String, Int32, Int32, StringComparison) Reports the zero-based index of the first occurrence of the specified string in the current String object. Parameters specify the starting search position in the current string, the number of characters in the current string to search, and the type of search to use for the specified string.
IndexOfAny(Char[]) Reports the zero-based index of the first occurrence in this instance of any character in a specified array of Unicode characters.
IndexOfAny(Char[], Int32) Reports the zero-based index of the first occurrence in this instance of any character in a specified array of Unicode characters. The search starts at a specified character position.
IndexOfAny(Char[], Int32, Int32) Reports the zero-based index of the first occurrence in this instance of any character in a specified array of Unicode characters. The search starts at a specified character position and examines a specified number of character positions.
Insert Returns a new string in which a specified string is inserted at a specified index position in this instance.
Intern Retrieves the system's reference to the specified String.
IsInterned Retrieves a reference to a specified String.
IsNormalized() Indicates whether this string is in Unicode normalization form C.
IsNormalized(NormalizationForm) Indicates whether this string is in the specified Unicode normalization form.
IsNullOrEmpty Indicates whether the specified string is null or an Empty string.
IsNullOrWhiteSpace Indicates whether a specified string is null, empty, or consists only of white-space characters.
Join(String, IEnumerable<String>) Concatenates the members of a constructed IEnumerable<T> collection of type String, using the specified separator between each member.
Join(String, Object[]) Concatenates the elements of an object array, using the specified separator between each element.
Join(String, String[]) Concatenates all the elements of a string array, using the specified separator between each element.
Join(String, String[], Int32, Int32) Concatenates the specified elements of a string array, using the specified separator between each element.
Join<T>(String, IEnumerable<T>) Concatenates the members of a collection, using the specified separator between each member.
LastIndexOf(Char) Reports the zero-based index position of the last occurrence of a specified Unicode character within this instance.
LastIndexOf(String) Reports the zero-based index position of the last occurrence of a specified string within this instance.
LastIndexOf(Char, Int32) Reports the zero-based index position of the last occurrence of a specified Unicode character within this instance. The search starts at a specified character position and proceeds backward toward the beginning of the string.
LastIndexOf(String, Int32) Reports the zero-based index position of the last occurrence of a specified string within this instance. The search starts at a specified character position and proceeds backward toward the beginning of the string.
LastIndexOf(String, StringComparison) Reports the zero-based index of the last occurrence of a specified string within the current String object. A parameter specifies the type of search to use for the specified string.
LastIndexOf(Char, Int32, Int32) Reports the zero-based index position of the last occurrence of the specified Unicode character in a substring within this instance. The search starts at a specified character position and proceeds backward toward the beginning of the string for a specified number of character positions.
LastIndexOf(String, Int32, Int32) Reports the zero-based index position of the last occurrence of a specified string within this instance. The search starts at a specified character position and proceeds backward toward the beginning of the string for a specified number of character positions.
LastIndexOf(String, Int32, StringComparison) Reports the zero-based index of the last occurrence of a specified string within the current String object. The search starts at a specified character position and proceeds backward toward the beginning of the string. A parameter specifies the type of comparison to perform when searching for the specified string.
LastIndexOf(String, Int32, Int32, StringComparison) Reports the zero-based index position of the last occurrence of a specified string within this instance. The search starts at a specified character position and proceeds backward toward the beginning of the string for the specified number of character positions. A parameter specifies the type of comparison to perform when searching for the specified string.
LastIndexOfAny(Char[]) Reports the zero-based index position of the last occurrence in this instance of one or more characters specified in a Unicode array.
LastIndexOfAny(Char[], Int32) Reports the zero-based index position of the last occurrence in this instance of one or more characters specified in a Unicode array. The search starts at a specified character position and proceeds backward toward the beginning of the string.
LastIndexOfAny(Char[], Int32, Int32) Reports the zero-based index position of the last occurrence in this instance of one or more characters specified in a Unicode array. The search starts at a specified character position and proceeds backward toward the beginning of the string for a specified number of character positions.
Normalize() Returns a new string whose textual value is the same as this string, but whose binary representation is in Unicode normalization form C.
Normalize(NormalizationForm) Returns a new string whose textual value is the same as this string, but whose binary representation is in the specified Unicode normalization form.
PadLeft(Int32) Returns a new string that right-aligns the characters in this instance by padding them with spaces on the left, for a specified total length.
PadLeft(Int32, Char) Returns a new string that right-aligns the characters in this instance by padding them on the left with a specified Unicode character, for a specified total length.
PadRight(Int32) Returns a new string that left-aligns the characters in this string by padding them with spaces on the right, for a specified total length.
PadRight(Int32, Char) Returns a new string that left-aligns the characters in this string by padding them on the right with a specified Unicode character, for a specified total length.
Remove(Int32) Returns a new string in which all the characters in the current instance, beginning at a specified position and continuing through the last position, have been deleted.
Remove(Int32, Int32) Returns a new string in which a specified number of characters in the current this instance beginning at a specified position have been deleted.
Replace(Char, Char) Returns a new string in which all occurrences of a specified Unicode character in this instance are replaced with another specified Unicode character.
Replace(String, String) Returns a new string in which all occurrences of a specified string in the current instance are replaced with another specified string.
Split(Char[]) Returns a string array that contains the substrings in this instance that are delimited by elements of a specified Unicode character array.
Split(Char[], Int32) Returns a string array that contains the substrings in this instance that are delimited by elements of a specified Unicode character array. A parameter specifies the maximum number of substrings to return.
Split(Char[], StringSplitOptions) Returns a string array that contains the substrings in this string that are delimited by elements of a specified Unicode character array. A parameter specifies whether to return empty array elements.
Split(String[], StringSplitOptions) Returns a string array that contains the substrings in this string that are delimited by elements of a specified string array. A parameter specifies whether to return empty array elements.
Split(Char[], Int32, StringSplitOptions) Returns a string array that contains the substrings in this string that are delimited by elements of a specified Unicode character array. Parameters specify the maximum number of substrings to return and whether to return empty array elements.
Split(String[], Int32, StringSplitOptions) Returns a string array that contains the substrings in this string that are delimited by elements of a specified string array. Parameters specify the maximum number of substrings to return and whether to return empty array elements.
StartsWith(String) Determines whether the beginning of this string instance matches the specified string.
StartsWith(String, StringComparison) Determines whether the beginning of this string instance matches the specified string when compared using the specified comparison option.
StartsWith(String, Boolean, CultureInfo) Determines whether the beginning of this string instance matches the specified string when compared using the specified culture.
Substring(Int32) Retrieves a substring from this instance. The substring starts at a specified character position.
Substring(Int32, Int32) Retrieves a substring from this instance. The substring starts at a specified character position and has a specified length.
ToCharArray() Copies the characters in this instance to a Unicode character array.
ToCharArray(Int32, Int32) Copies the characters in a specified substring in this instance to a Unicode character array.
ToLower() Returns a copy of this string converted to lowercase.
ToLower(CultureInfo) Returns a copy of this string converted to lowercase, using the casing rules of the specified culture.
ToLowerInvariant Returns a copy of this String object converted to lowercase using the casing rules of the invariant culture.
ToString() Returns this instance of String; no actual conversion is performed. (Overrides Object.ToString().)
ToString(IFormatProvider) Returns this instance of String; no actual conversion is performed.
ToUpper() Returns a copy of this string converted to uppercase.
ToUpper(CultureInfo) Returns a copy of this string converted to uppercase, using the casing rules of the specified culture.
ToUpperInvariant Returns a copy of this String object converted to uppercase using the casing rules of the invariant culture.
Trim() Removes all leading and trailing white-space characters from the current String object.
Trim(Char[]) Removes all leading and trailing occurrences of a set of characters specified in an array from the current String object.
TrimEnd Removes all trailing occurrences of a set of characters specified in an array from the current String object.
TrimStart Removes all leading occurrences of a set of characters specified in an array from the current String object.
Top
                            Name Description
Equality Determines whether two specified strings have the same value.
Inequality Determines whether two specified strings have different values.
Top
                            Name Description
Aggregate<Char>(Func<Char, Char, Char>) Overloaded.  Applies an accumulator function over a sequence. (Defined by Enumerable.)
Aggregate<Char, TAccumulate>(TAccumulate, Func<TAccumulate, Char, TAccumulate>) Overloaded.  Applies an accumulator function over a sequence. The specified seed value is used as the initial accumulator value. (Defined by Enumerable.)
Aggregate<Char, TAccumulate, TResult>(TAccumulate, Func<TAccumulate, Char, TAccumulate>, Func<TAccumulate, TResult>) Overloaded.  Applies an accumulator function over a sequence. The specified seed value is used as the initial accumulator value, and the specified function is used to select the result value. (Defined by Enumerable.)
All<Char> Determines whether all elements of a sequence satisfy a condition. (Defined by Enumerable.)
Any<Char>() Overloaded.  Determines whether a sequence contains any elements. (Defined by Enumerable.)
Any<Char>(Func<Char, Boolean>) Overloaded.  Determines whether any element of a sequence satisfies a condition. (Defined by Enumerable.)
AsEnumerable<Char> Returns the input typed as IEnumerable<T>. (Defined by Enumerable.)
AsParallel() Overloaded.  Enables parallelization of a query. (Defined by ParallelEnumerable.)
AsParallel<Char>() Overloaded.  Enables parallelization of a query. (Defined by ParallelEnumerable.)
AsQueryable() Overloaded.  Converts an IEnumerable to an IQueryable. (Defined by Queryable.)
AsQueryable<Char>() Overloaded.  Converts a generic IEnumerable<T> to a generic IQueryable<T>. (Defined by Queryable.)
Average<Char>(Func<Char, Int32>) Overloaded.  Computes the average of a sequence of Int32 values that are obtained by invoking a transform function on each element of the input sequence. (Defined by Enumerable.)
Average<Char>(Func<Char, Nullable<Int32>>) Overloaded.  Computes the average of a sequence of nullable Int32 values that are obtained by invoking a transform function on each element of the input sequence. (Defined by Enumerable.)
Average<Char>(Func<Char, Int64>) Overloaded.  Computes the average of a sequence of Int64 values that are obtained by invoking a transform function on each element of the input sequence. (Defined by Enumerable.)
Average<Char>(Func<Char, Nullable<Int64>>) Overloaded.  Computes the average of a sequence of nullable Int64 values that are obtained by invoking a transform function on each element of the input sequence. (Defined by Enumerable.)
Average<Char>(Func<Char, Single>) Overloaded.  Computes the average of a sequence of Single values that are obtained by invoking a transform function on each element of the input sequence. (Defined by Enumerable.)
Average<Char>(Func<Char, Nullable<Single>>) Overloaded.  Computes the average of a sequence of nullable Single values that are obtained by invoking a transform function on each element of the input sequence. (Defined by Enumerable.)
Average<Char>(Func<Char, Double>) Overloaded.  Computes the average of a sequence of Double values that are obtained by invoking a transform function on each element of the input sequence. (Defined by Enumerable.)
Average<Char>(Func<Char, Nullable<Double>>) Overloaded.  Computes the average of a sequence of nullable Double values that are obtained by invoking a transform function on each element of the input sequence. (Defined by Enumerable.)
Average<Char>(Func<Char, Decimal>) Overloaded.  Computes the average of a sequence of Decimal values that are obtained by invoking a transform function on each element of the input sequence. (Defined by Enumerable.)
Average<Char>(Func<Char, Nullable<Decimal>>) Overloaded.  Computes the average of a sequence of nullable Decimal values that are obtained by invoking a transform function on each element of the input sequence. (Defined by Enumerable.)
Cast<TResult> Casts the elements of an IEnumerable to the specified type. (Defined by Enumerable.)
Concat<Char> Concatenates two sequences. (Defined by Enumerable.)
Contains<Char>(Char) Overloaded.  Determines whether a sequence contains a specified element by using the default equality comparer. (Defined by Enumerable.)
Contains<Char>(Char, IEqualityComparer<Char>) Overloaded.  Determines whether a sequence contains a specified element by using a specified IEqualityComparer<T>. (Defined by Enumerable.)
Count<Char>() Overloaded.  Returns the number of elements in a sequence. (Defined by Enumerable.)
Count<Char>(Func<Char, Boolean>) Overloaded.  Returns a number that represents how many elements in the specified sequence satisfy a condition. (Defined by Enumerable.)

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

上一篇:
C#String.Format格式说明发布时间:2022-07-13
下一篇:
C#学习——CLR异常处理原理发布时间:2022-07-13
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap