System

Namespaces

Classes

Interfaces

Structs

Enums

Represents text as a sequence of characters.

Inheritance: ObjectString

Constructors

  • String(char[] value)
    Initializes a new instance of the String class to the value indicated by a specified array of Unicode characters.
  • String(char[] value, int startIndex, int length)
    Initializes a new instance of the String class to the value indicated by a specified subarray of Unicode characters, a starting position and a length.

Properties

  • ⚙️
    Chars[int index]
    Gets the Char object at the specified position in the current String object.
  • ⚙️
    Length
    Gets the number of characters in the current String object.

Methods

  • ▶️
    CompareTo(string strB)
    Compares the current string instance to another string instance.
  • ▶️
    Contains(string value)
    Determines whether the specified string occurs within this string.
  • ▶️
    EndsWith(string value)
    Determines whether the specified string ends with the characters of this string.
  • ▶️
    Equals(string value)
    Determines whether the specified string is equal to the current string.
  • ▶️
    IndexOf(string value)
    Returns the zero-based index of the first occurrence of the specified string within this string.
  • ▶️
    Insert(int startIndex, string value)
    Inserts a string into this instance at the specified zero-based index.
  • ▶️
    PadLeft(int totalWidth, char paddingChar)
    Pads the current string with as many specified characters as needed to reach a specified total length, and aligns the text to the center of the padded space.
  • ▶️
    Remove(int startIndex)
    Removes all characters from this string starting at a specified position and continuing through the last position.
  • ▶️
    Replace(char oldChar, char newChar)
    Replaces all occurrences of a specified Unicode character in this instance with another specified Unicode character.
  • ▶️
    Split(char[] separator)
    Splits this string into a sequence of substrings based on the specified separators.
  • ▶️
    StartsWith(string value)
    Determines whether the current string begins with the specified string.
  • ▶️
    Substring(int startIndex)
    Retrieves a substring from this instance. The substring starts at a specified character position and continues to the end of the string.
  • ▶️
    ToLower()
    Converts this string to lowercase.
  • ▶️
    ToUpper()
    Converts this string to uppercase.
  • ▶️
    Trim()
    Removes all leading and trailing white space characters from the current String object.
  • ▶️
    TrimEnd(char[] trimChars)
    Removes all trailing occurrences of a set of characters specified by trimChars from the current String object.
  • ▶️
    TrimStart(char[] trimChars)
    Removes all leading occurrences of a set of characters specified by trimChars from the current String object.
  • ▶️
    Format(string format, object arg0)
    Formats a string by using the specified format string and arguments.

Fields

  • 🏷️
    Empty
    Represents an empty string.