Show / Hide Table of Contents

    Class String

    Represents text as a sequence of UTF-16 code units.

    Inheritance
    Object
    String
    Implements
    IComparable
    IEnumerable
    Inherited Members
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: System
    Assembly: mscorlib.dll
    Syntax
    public sealed class String : IComparable, IEnumerable

    Constructors

    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.

    Declaration
    public extern String(char c, int count)
    Parameters
    Type Name Description
    Char c

    A Unicode character.

    Int32 count

    The number of times c occurs.

    String(Char[])

    Initializes a new instance of the String class to the value indicated by an array of Unicode characters.

    Declaration
    public extern String(char[] value)
    Parameters
    Type Name Description
    Char[] value

    An array of Unicode characters.

    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.

    Declaration
    public extern String(char[] value, int startIndex, int length)
    Parameters
    Type Name Description
    Char[] value

    An array of Unicode characters.

    Int32 startIndex

    The starting position within value.

    Int32 length

    The number of characters within value to use.

    Fields

    | Improve this Doc View Source

    Empty

    Represents the empty string. This field is read-only.

    Declaration
    public static readonly string Empty
    Field Value
    Type Description
    String

    Properties

    Chars[Int32]

    Gets the Char object at a specified position in the current String object.

    Declaration
    public char this[int index] { get; }
    Parameters
    Type Name Description
    Int32 index

    A position in the current string.

    Property Value
    Type Description
    Char

    The object at position index.

    Length

    Gets the number of characters in the current String object.

    Declaration
    public int Length { get; }
    Property Value
    Type Description
    Int32

    The number of characters in the current string.

    Methods

    Compare(String, String)

    Compares two specified String objects and returns an integer that indicates their relative position in the sort order.

    Declaration
    public static extern int Compare(string strA, string strB)
    Parameters
    Type Name Description
    String strA

    The first string to compare.

    String strB

    The second string to compare.

    Returns
    Type Description
    Int32

    A 32-bit signed integer that indicates the lexical relationship between the two comparands.

    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.

    Declaration
    public extern int CompareTo(object value)
    Parameters
    Type Name Description
    Object value

    An object that evaluates to a String.

    Returns
    Type Description
    Int32

    A 32-bit signed integer that indicates whether this instance precedes, follows, or appears in the same position in the sort order as the value parameter.

    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.

    Declaration
    public extern int CompareTo(string strB)
    Parameters
    Type Name Description
    String strB

    The string to compare with this instance.

    Returns
    Type Description
    Int32

    A 32-bit signed integer that indicates whether this instance precedes, follows, or appears in the same position in the sort order as the strB parameter.

    | Improve this Doc View Source

    Concat(Object)

    Creates the string representation of a specified object.

    Declaration
    public static string Concat(object arg0)
    Parameters
    Type Name Description
    Object arg0

    The object to represent, or null.

    Returns
    Type Description
    String

    The string representation of the value of arg0, or String.Empty if arg0 is null.

    | Improve this Doc View Source

    Concat(Object, Object)

    Concatenates the string representations of two specified objects.

    Declaration
    public static string Concat(object arg0, object arg1)
    Parameters
    Type Name Description
    Object arg0

    The first object to concatenate.

    Object arg1

    The second object to concatenate.

    Returns
    Type Description
    String

    The concatenated string representations of the values of arg0 and arg1.

    | Improve this Doc View Source

    Concat(Object, Object, Object)

    Concatenates the string representations of three specified objects.

    Declaration
    public static string Concat(object arg0, object arg1, object arg2)
    Parameters
    Type Name Description
    Object arg0

    The first object to concatenate.

    Object arg1

    The second object to concatenate.

    Object arg2

    The third object to concatenate.

    Returns
    Type Description
    String

    The concatenated string representations of the values of arg0, arg1 and arg2.

    | Improve this Doc View Source

    Concat(Object[])

    Concatenates the string representations of the elements in a specified Object array.

    Declaration
    public static string Concat(params object[] args)
    Parameters
    Type Name Description
    Object[] args

    An object array that contains the elements to concatenate.

    Returns
    Type Description
    String

    The concatenated string representations of the values of the elements in args.

    Exceptions
    Type Condition
    ArgumentNullException

    Concat(String, String)

    Concatenates two specified instances of String.

    Declaration
    public static extern string Concat(string str0, string str1)
    Parameters
    Type Name Description
    String str0

    The first string to concatenate.

    String str1

    The second string to concatenate.

    Returns
    Type Description
    String

    The concatenation of str0 and str1.

    Concat(String, String, String)

    Concatenates three specified instances of String.

    Declaration
    public static extern string Concat(string str0, string str1, string str2)
    Parameters
    Type Name Description
    String str0

    The first string to concatenate.

    String str1

    The second string to concatenate.

    String str2

    The third string to concatenate.

    Returns
    Type Description
    String

    The concatenation of str0, str1 and str2.

    Concat(String, String, String, String)

    Concatenates four specified instances of String.

    Declaration
    public static extern string Concat(string str0, string str1, string str2, string str3)
    Parameters
    Type Name Description
    String str0

    The first string to concatenate.

    String str1

    The second string to concatenate.

    String str2

    The third string to concatenate.

    String str3

    The fourth string to concatenate.

    Returns
    Type Description
    String

    The concatenation of str0, str1, str2 and str3.

    Concat(String[])

    Concatenates the elements of a specified String array.

    Declaration
    public static extern string Concat(params string[] values)
    Parameters
    Type Name Description
    String[] values

    An array of string instances.

    Returns
    Type Description
    String

    The concatenated elements of values.

    | Improve this Doc View Source

    Contains(String)

    Returns a value indicating whether a specified substring occurs within this string.

    Declaration
    public bool Contains(string value)
    Parameters
    Type Name Description
    String value

    The string to seek.

    Returns
    Type Description
    Boolean

    true if the value parameter occurs within this string, or if value is the empty string (""); otherwise, false.

    | Improve this Doc View Source

    EndsWith(String)

    Determines whether the end of this string instance matches the specified string.

    Declaration
    public bool EndsWith(string value)
    Parameters
    Type Name Description
    String value

    The string to compare to the substring at the end of this instance.

    Returns
    Type Description
    Boolean

    true if value matches the end of this instance; otherwise, false.

    | Improve this Doc View Source

    Equals(Object)

    Determines whether this instance and a specified object, which must also be a String object, have the same value.

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    Object obj

    The string to compare to this instance.

    Returns
    Type Description
    Boolean

    true if obj is a String and its value is the same as this instance; otherwise, false. If obj is null, the method returns false.

    Overrides
    Object.Equals(Object)

    Equals(String, String)

    Determines whether two specified String objects have the same value.

    Declaration
    public static extern bool Equals(string a, string b)
    Parameters
    Type Name Description
    String a

    The first string to compare, or null.

    String b

    The second string to compare, or null.

    Returns
    Type Description
    Boolean

    true if the value of a is the same as the value of b; otherwise, false. If both a and b are null, the method returns true.

    | Improve this Doc View Source

    Format(String, Object[])

    Replaces the format items in a string with the string representations of corresponding objects in a specified array.

    Declaration
    public static string Format(string format, params object[] args)
    Parameters
    Type Name Description
    String format

    A composite format string

    Object[] args

    An object array that contains zero or more objects to format.

    Returns
    Type Description
    String

    A copy of format in which the format items have been replaced by the string representation of the corresponding objects in args.

    | Improve this Doc View Source

    GetEnumerator()

    Not supported in NanoFramework
    Return an enumerator that iterate on each char of the string.

    Declaration
    public IEnumerator GetEnumerator()
    Returns
    Type Description
    IEnumerator

    An IEnumerator object that can be used to iterate through the collection.

    IndexOf(Char)

    Reports the zero-based index of the first occurrence of the specified Unicode character in this string.

    Declaration
    public extern int IndexOf(char value)
    Parameters
    Type Name Description
    Char value

    A Unicode character to seek.

    Returns
    Type Description
    Int32

    The zero-based index position of value if that character is found, or -1 if it is not.

    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.

    Declaration
    public extern int IndexOf(char value, int startIndex)
    Parameters
    Type Name Description
    Char value

    A Unicode character to seek.

    Int32 startIndex

    The search starting position.

    Returns
    Type Description
    Int32

    The zero-based index position of value from the start of the string if that character is found, or -1 if it is not.

    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.

    Declaration
    public extern int IndexOf(char value, int startIndex, int count)
    Parameters
    Type Name Description
    Char value

    A Unicode character to seek.

    Int32 startIndex

    The search starting position.

    Int32 count

    The number of character positions to examine.

    Returns
    Type Description
    Int32

    The zero-based index position of value if that character is found, or -1 if it is not.

    IndexOf(String)

    Reports the zero-based index of the first occurrence of the specified string in this instance.

    Declaration
    public extern int IndexOf(string value)
    Parameters
    Type Name Description
    String value

    The string to seek.

    Returns
    Type Description
    Int32

    The zero-based index position of value if that string is found, or -1 if it is not. If value is String.Empty, the return value is 0.

    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.

    Declaration
    public extern int IndexOf(string value, int startIndex)
    Parameters
    Type Name Description
    String value

    The string to seek.

    Int32 startIndex

    The search starting position.

    Returns
    Type Description
    Int32

    The zero-based index position of value from the start of the current instance if that string is found, or -1 if it is not. If value is String.Empty, the return value is startIndex.

    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.

    Declaration
    public extern int IndexOf(string value, int startIndex, int count)
    Parameters
    Type Name Description
    String value

    The string to seek.

    Int32 startIndex

    The search starting position.

    Int32 count

    The number of character positions to examine.

    Returns
    Type Description
    Int32

    The zero-based index position of value from the start of the current instance if that string is found, or -1 if it is not. If value is String.Empty, the return value is startIndex.

    IndexOfAny(Char[])

    Reports the zero-based index of the first occurrence in this instance of any character in a specified array of Unicode characters.

    Declaration
    public extern int IndexOfAny(char[] anyOf)
    Parameters
    Type Name Description
    Char[] anyOf

    A Unicode character array containing one or more characters to seek.

    Returns
    Type Description
    Int32

    The zero-based index position of the first occurrence in this instance where any character in anyOf was found; -1 if no character in anyOf was found.

    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.

    Declaration
    public extern int IndexOfAny(char[] anyOf, int startIndex)
    Parameters
    Type Name Description
    Char[] anyOf

    A Unicode character array containing one or more characters to seek.

    Int32 startIndex

    The search starting position.

    Returns
    Type Description
    Int32

    The zero-based index position of the first occurrence in this instance where any character in anyOf was found; -1 if no character in anyOf was found.

    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.

    Declaration
    public extern int IndexOfAny(char[] anyOf, int startIndex, int count)
    Parameters
    Type Name Description
    Char[] anyOf

    A Unicode character array containing one or more characters to seek.

    Int32 startIndex

    The search starting position.

    Int32 count

    The number of character positions to examine.

    Returns
    Type Description
    Int32

    The zero-based index position of the first occurrence in this instance where any character in anyOf was found; -1 if no character in anyOf was found.

    | Improve this Doc View Source

    Intern(String)

    Retrieves the system's reference to the specified String.

    Declaration
    public static string Intern(string str)
    Parameters
    Type Name Description
    String str

    A string to search for in the intern pool.

    Returns
    Type Description
    String

    The system's reference to str, if it is interned; otherwise, a new reference to a string with the value of str.

    | Improve this Doc View Source

    IsInterned(String)

    Retrieves a reference to a specified String.

    Declaration
    public static string IsInterned(string str)
    Parameters
    Type Name Description
    String str

    The string to search for in the intern pool.

    Returns
    Type Description
    String

    A reference to str if it is in the common language runtime intern pool; otherwise, null.

    | Improve this Doc View Source

    IsNullOrEmpty(String)

    Indicates whether the specified string is null or an empty string ("").

    Declaration
    public static bool IsNullOrEmpty(string value)
    Parameters
    Type Name Description
    String value

    The string to test.

    Returns
    Type Description
    Boolean

    true if the value parameter is null or an empty string (""); otherwise, false.

    LastIndexOf(Char)

    Reports the zero-based index position of the last occurrence of a specified Unicode character within this instance.

    Declaration
    public extern int LastIndexOf(char value)
    Parameters
    Type Name Description
    Char value

    The Unicode character to seek.

    Returns
    Type Description
    Int32

    The zero-based index position of value if that character is found, or -1 if it is not.

    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.

    Declaration
    public extern int LastIndexOf(char value, int startIndex)
    Parameters
    Type Name Description
    Char value

    The Unicode character to seek.

    Int32 startIndex

    The starting position of the search. The search proceeds from startIndex toward the beginning of this instance.

    Returns
    Type Description
    Int32

    The zero-based index position of value if that character is found, or -1 if it is not found or if the current instance equals String.Empty.

    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.

    Declaration
    public extern int LastIndexOf(char value, int startIndex, int count)
    Parameters
    Type Name Description
    Char value

    The Unicode character to seek.

    Int32 startIndex

    The starting position of the search. The search proceeds from startIndex toward the beginning of this instance.

    Int32 count

    The number of character positions to examine.

    Returns
    Type Description
    Int32

    The zero-based index position of value if that character is found, or -1 if it is not found or if the current instance equals String.Empty.

    LastIndexOf(String)

    Reports the zero-based index position of the last occurrence of a specified string within this instance.

    Declaration
    public extern int LastIndexOf(string value)
    Parameters
    Type Name Description
    String value

    The string to seek.

    Returns
    Type Description
    Int32

    The zero-based starting index position of value if that string is found, or -1 if it is not. If value is String.Empty, the return value is the last index position in this instance.

    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.

    Declaration
    public extern int LastIndexOf(string value, int startIndex)
    Parameters
    Type Name Description
    String value

    The string to seek.

    Int32 startIndex

    The search starting position. The search proceeds from startIndex toward the beginning of this instance.

    Returns
    Type Description
    Int32

    The zero-based starting index position of value if that string is found, or -1 if it is not found or if the current instance equals String.Empty. If value is String.Empty, the return value is the smaller of startIndex and the last index position in this instance.

    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.

    Declaration
    public extern int LastIndexOf(string value, int startIndex, int count)
    Parameters
    Type Name Description
    String value

    The string to seek.

    Int32 startIndex

    The search starting position. The search proceeds from startIndex toward the beginning of this instance.

    Int32 count

    The number of character positions to examine.

    Returns
    Type Description
    Int32

    The zero-based starting index position of value if that string is found, or -1 if it is not found or if the current instance equals String.Empty. If value is Empty, the return value is the smaller of startIndex and the last index position in this instance.

    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.

    Declaration
    public extern int LastIndexOfAny(char[] anyOf)
    Parameters
    Type Name Description
    Char[] anyOf

    A Unicode character array containing one or more characters to seek.

    Returns
    Type Description
    Int32

    The index position of the last occurrence in this instance where any character in anyOf was found; -1 if no character in anyOf was found.

    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.

    Declaration
    public extern int LastIndexOfAny(char[] anyOf, int startIndex)
    Parameters
    Type Name Description
    Char[] anyOf

    A Unicode character array containing one or more characters to seek.

    Int32 startIndex

    The search starting position. The search proceeds from startIndex toward the beginning of this instance.

    Returns
    Type Description
    Int32

    The index position of the last occurrence in this instance where any character in anyOf was found; -1 if no character in anyOf was found or if the current instance equals String.Empty.

    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.

    Declaration
    public extern int LastIndexOfAny(char[] anyOf, int startIndex, int count)
    Parameters
    Type Name Description
    Char[] anyOf

    A Unicode character array containing one or more characters to seek.

    Int32 startIndex

    The search starting position. The search proceeds from startIndex toward the beginning of this instance.

    Int32 count

    The number of character positions to examine.

    Returns
    Type Description
    Int32

    The index position of the last occurrence in this instance where any character in anyOf was found; -1 if no character in anyOf was found or if the current instance equals String.Empty.

    | Improve this Doc View Source

    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.

    Declaration
    public string PadLeft(int totalWidth, char paddingChar = ' ')
    Parameters
    Type Name Description
    Int32 totalWidth

    The number of characters in the resulting string, equal to the number of original characters plus any additional padding characters.

    Char paddingChar

    A Unicode padding character.

    Returns
    Type Description
    String
    | Improve this Doc View Source

    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.

    Declaration
    public string PadRight(int totalWidth, char paddingChar = ' ')
    Parameters
    Type Name Description
    Int32 totalWidth

    The number of characters in the resulting string, equal to the number of original characters plus any additional padding characters.

    Char paddingChar

    A Unicode padding character.

    Returns
    Type Description
    String

    Split(Char[])

    Splits a string into substrings that are based on the characters in an array.

    Declaration
    public extern string[] Split(params char[] separator)
    Parameters
    Type Name Description
    Char[] separator

    A character array that delimits the substrings in this string, an empty array that contains no delimiters, or null.

    Returns
    Type Description
    String[]

    An array whose elements contain the substrings from this instance that are delimited by one or more characters in separator. For more information, see the Remarks section.

    Split(Char[], Int32)

    Splits a string into a maximum number of substrings based on the characters in an array. You also specify the maximum number of substrings to return.

    Declaration
    public extern string[] Split(char[] separator, int count)
    Parameters
    Type Name Description
    Char[] separator

    A character array that delimits the substrings in this string, an empty array that contains no delimiters, or null.

    Int32 count

    The maximum number of substrings to return.

    Returns
    Type Description
    String[]

    An array whose elements contain the substrings in this instance that are delimited by one or more characters in separator. For more information, see the Remarks section.

    | Improve this Doc View Source

    StartsWith(String)

    Determines whether the beginning of this string instance matches the specified string.

    Declaration
    public bool StartsWith(string value)
    Parameters
    Type Name Description
    String value

    The string to compare.

    Returns
    Type Description
    Boolean

    true if value matches the beginning of this string; otherwise, false.

    Exceptions
    Type Condition
    ArgumentNullException

    value is null.

    Substring(Int32)

    Retrieves a substring from this instance. The substring starts at a specified character position and continues to the end of the string.

    Declaration
    public extern string Substring(int startIndex)
    Parameters
    Type Name Description
    Int32 startIndex

    The zero-based starting character position of a substring in this instance.

    Returns
    Type Description
    String

    A string that is equivalent to the substring that begins at startIndex in this instance, or Empty if startIndex is equal to the length of this instance.

    Substring(Int32, Int32)

    Retrieves a substring from this instance. The substring starts at a specified character position and has a specified length.

    Declaration
    public extern string Substring(int startIndex, int length)
    Parameters
    Type Name Description
    Int32 startIndex

    The zero-based starting character position of a substring in this instance.

    Int32 length

    The number of characters in the substring.

    Returns
    Type Description
    String

    A string that is equivalent to the substring of length length that begins at startIndex in this instance, or Empty if startIndex is equal to the length of this instance and length is zero.

    ToCharArray()

    Copies the characters in this instance to a Unicode character array.

    Declaration
    public extern char[] ToCharArray()
    Returns
    Type Description
    Char[]

    A Unicode character array whose elements are the individual characters of this instance. If this instance is an empty string, the returned array is empty and has a zero length.

    ToCharArray(Int32, Int32)

    Copies the characters in a specified substring in this instance to a Unicode character array.

    Declaration
    public extern char[] ToCharArray(int startIndex, int length)
    Parameters
    Type Name Description
    Int32 startIndex

    The starting position of a substring in this instance.

    Int32 length

    The length of the substring in this instance.

    Returns
    Type Description
    Char[]

    A Unicode character array whose elements are the length number of characters in this instance starting from character position startIndex.

    ToLower()

    Returns a copy of this string converted to lowercase.

    Declaration
    public extern string ToLower()
    Returns
    Type Description
    String

    A string in lowercase.

    | Improve this Doc View Source

    ToString()

    Returns this instance of String; no actual conversion is performed.

    Declaration
    public override string ToString()
    Returns
    Type Description
    String

    The current string.

    Overrides
    Object.ToString()

    ToUpper()

    Returns a copy of this string converted to uppercase.

    Declaration
    public extern string ToUpper()
    Returns
    Type Description
    String

    The uppercase equivalent of the current string.

    Trim()

    Removes all leading and trailing white-space characters from the current String object.

    Declaration
    public extern string Trim()
    Returns
    Type Description
    String

    The string that remains after all white-space characters are removed from the start and end of the current string. If no characters can be trimmed from the current instance, the method returns the current instance unchanged.

    Trim(Char[])

    Removes all leading and trailing occurrences of a set of characters specified in an array from the current String object.

    Declaration
    public extern string Trim(params char[] trimChars)
    Parameters
    Type Name Description
    Char[] trimChars

    An array of Unicode characters to remove, or null.

    Returns
    Type Description
    String

    The string that remains after all occurrences of the characters in the trimChars parameter are removed from the start and end of the current string. If trimChars is null or an empty array, white-space characters are removed instead. If no characters can be trimmed from the current instance, the method returns the current instance unchanged.

    TrimEnd(Char[])

    Removes all trailing occurrences of a set of characters specified in an array from the current String object.

    Declaration
    public extern string TrimEnd(params char[] trimChars)
    Parameters
    Type Name Description
    Char[] trimChars

    An array of Unicode characters to remove, or null.

    Returns
    Type Description
    String

    The string that remains after all occurrences of the characters in the trimChars parameter are removed from the end of the current string. If trimChars is null or an empty array, Unicode white-space characters are removed instead. If no characters can be trimmed from the current instance, the method returns the current instance unchanged.

    TrimStart(Char[])

    Removes all leading occurrences of a set of characters specified in an array from the current String object.

    Declaration
    public extern string TrimStart(params char[] trimChars)
    Parameters
    Type Name Description
    Char[] trimChars

    An array of Unicode characters to remove, or null.

    Returns
    Type Description
    String

    The string that remains after all occurrences of characters in the trimChars parameter are removed from the start of the current string. If trimChars is null or an empty array, white-space characters are removed instead.

    Operators

    Equality(String, String)

    Determines whether two specified strings have the same value.

    Declaration
    public static extern bool operator ==(string a, string b)
    Parameters
    Type Name Description
    String a

    The first string to compare, or null.

    String b

    The second string to compare, or null.

    Returns
    Type Description
    Boolean

    true if the value of a is the same as the value of b; otherwise, false.

    Inequality(String, String)

    Determines whether two specified strings have different values.

    Declaration
    public static extern bool operator !=(string a, string b)
    Parameters
    Type Name Description
    String a

    The first string to compare, or null.

    String b

    The second string to compare, or null.

    Returns
    Type Description
    Boolean

    true if the value of a is different from the value of b; otherwise, false.

    Implements

    IComparable
    IEnumerable

    Extension Methods

    LogDispatcher.GetCurrentClassLogger(Object)
    • Improve this Doc
    • View Source
    Back to top Copyright © 2018 nanoFramework Contributors
    Generated by DocFX