String Class

Handles fixed length strings and do not need editing
The Chars property holds an array of all the characters in a string starting at index 0.


Properties

CharsGets the character at a specified character position in this instance. In C# this property is the indexer for the string class.
LengthReturns the length of the string.

Methods

CloneReturns a reference to this instance of String.
CompareCompares two strings.
CompareOrdinalCompares two String objects, without considering the local national language or culture.
CompareToCompares this instance with a specified object.
ConcatConcatenates one or more instances of String, or the String representations of the values of one or more instances of Object.
CopyCreates a new string by copying an existing string.
CopyToCopies a specified number of characters from a specified position in this instance to a specified position in an array of Unicode characters.
EndsWithDetermines whether the end of this instance matches the specified String
EqualsDetermines if two strings are equal (i.e. have the same value).
FormatFormats a string to a particular specification
GetEnumeratorRetrieves an object that can iterate through the individual characters in this instance.
GetHashCodeReturns the hash code for this instance.
GetTypeGets the Type of the current instance.
GetTypeCodeReturns the TypeCode for class String.
IndexOfReturns the index of the first occurrence of a character in a String. This is the equivalent for the VBA InStr() function
IndexOfAnyReturns the index of the first occurrence in any of the characters in an array.
InsertInserts a specified instance of String at a specified index position in this instance.
InternRetrieves the system's reference to the specified String.
IsInterned 
JoinConcatenates a specified separator String between each element of a specified String array, yielding a single concatenated string.
LastIndexOfReturns the index of the last occurrence of a character in a String.
LastIndexOfAnyReturns the index of the last occurrence in any of the characters in an array.
PadLeftRight aligns the characters in the string by padding the left with spaces.
PadRightLeft aligns the characters in the string by padding the right with spaces.
RemoveDeletes the specified number of characters.
ReplaceReplaces all occurrences of a single character with another character or String.
SplitReturns an array. Divides a string, returning the substrings delimited by a specified character.
StartsWithIndicates if a string starts with the specified characters.
SubstringRetrieves a substring from the string.
ToCharArrayCopies the characters from the string to a character array.
ToLowerReturns the text string with all characters converted to lowercase (String).
ToStringConverts the value of this instance to a String.
ToUpperReturns the text string with all the characters converted to uppercase (String).
TrimReturns the text string removing leading and trailing spaces (String).
TrimEndReturns the text string removing only trailing spaces (String).
TrimStartReturns the text string removing only leading spaces (String).

© 2020 Better Solutions Limited. All Rights Reserved. © 2020 Better Solutions Limited TopPrevNext