Strings Class
The Strings module contains procedures used to perform string operations.
Assembly: Microsoft.VisualBasic (in Microsoft.VisualBasic.dll)
| Name | Description | |
|---|---|---|
![]() ![]() | Asc(Char) | Returns an Integer value representing the character code corresponding to a character. |
![]() ![]() | Asc(String) | Returns an Integer value representing the character code corresponding to a character. |
![]() ![]() | AscW(Char) | Returns an Integer value representing the character code corresponding to a character. |
![]() ![]() | AscW(String) | Returns an Integer value representing the character code corresponding to a character. |
![]() ![]() | Chr(Int32) | Returns the character associated with the specified character code. |
![]() ![]() | ChrW(Int32) | Returns the character associated with the specified character code. |
![]() | Equals(Object) | Determines whether the specified object is equal to the current object.(Inherited from Object.) |
![]() ![]() | Filter(Object[], String, Boolean, CompareMethod) | Returns a zero-based array containing a subset of a String array based on specified filter criteria. |
![]() ![]() | Filter(String[], String, Boolean, CompareMethod) | Returns a zero-based array containing a subset of a String array based on specified filter criteria. |
![]() ![]() | Format(Object, String) | Returns a string formatted according to instructions contained in a format String expression. |
![]() ![]() | FormatCurrency(Object, Int32, TriState, TriState, TriState) | Returns an expression formatted as a currency value using the currency symbol defined in the system control panel. |
![]() ![]() | FormatDateTime(DateTime, DateFormat) | Returns a string expression representing a date/time value. |
![]() ![]() | FormatNumber(Object, Int32, TriState, TriState, TriState) | Returns an expression formatted as a number. |
![]() ![]() | FormatPercent(Object, Int32, TriState, TriState, TriState) | Returns an expression formatted as a percentage (that is, multiplied by 100) with a trailing % character. |
![]() ![]() | GetChar(String, Int32) | Returns a Char value representing the character from the specified index in the supplied string. |
![]() | GetHashCode() | Serves as the default hash function. (Inherited from Object.) |
![]() | GetType() | |
![]() ![]() | InStr(Int32, String, String, CompareMethod) | Returns an integer specifying the start position of the first occurrence of one string within another. |
![]() ![]() | InStr(String, String, CompareMethod) | Returns an integer specifying the start position of the first occurrence of one string within another. |
![]() ![]() | InStrRev(String, String, Int32, CompareMethod) | Returns the position of the first occurrence of one string within another, starting from the right side of the string. |
![]() ![]() | Join(Object[], String) | Returns a string created by joining a number of substrings contained in an array. |
![]() ![]() | Join(String[], String) | Returns a string created by joining a number of substrings contained in an array. |
![]() ![]() | LCase(Char) | Returns a string or character converted to lowercase. |
![]() ![]() | LCase(String) | Returns a string or character converted to lowercase. |
![]() ![]() | Left(String, Int32) | Returns a string containing a specified number of characters from the left side of a string. |
![]() ![]() | Len(Boolean) | Returns an integer containing either the number of characters in a string or the nominal number of bytes required to store a variable. |
![]() ![]() | Len(Byte) | Returns an integer containing either the number of characters in a string or the nominal number of bytes required to store a variable. |
![]() ![]() | Len(Char) | Returns an integer containing either the number of characters in a string or the nominal number of bytes required to store a variable. |
![]() ![]() | Len(DateTime) | Returns an integer containing either the number of characters in a string or the nominal number of bytes required to store a variable. |
![]() ![]() | Len(Decimal) | Returns an integer containing either the number of characters in a string or the nominal number of bytes required to store a variable. |
![]() ![]() | Len(Double) | Returns an integer containing either the number of characters in a string or the nominal number of bytes required to store a variable. |
![]() ![]() | Len(Int16) | Returns an integer containing either the number of characters in a string or the nominal number of bytes required to store a variable. |
![]() ![]() | Len(Int32) | Returns an integer containing either the number of characters in a string or the nominal number of bytes required to store a variable. |
![]() ![]() | Len(Int64) | Returns an integer containing either the number of characters in a string or the nominal number of bytes required to store a variable. |
![]() ![]() | Len(Object) | Returns an integer containing either the number of characters in a string or the nominal number of bytes required to store a variable. |
![]() ![]() | Len(SByte) | Returns an integer containing either the number of characters in a string or the nominal number of bytes required to store a variable. |
![]() ![]() | Len(Single) | Returns an integer containing either the number of characters in a string or the nominal number of bytes required to store a variable. |
![]() ![]() | Len(String) | Returns an integer containing either the number of characters in a string or the nominal number of bytes required to store a variable. |
![]() ![]() | Len(UInt16) | Returns an integer containing either the number of characters in a string or the nominal number of bytes required to store a variable. |
![]() ![]() | Len(UInt32) | Returns an integer containing either the number of characters in a string or the nominal number of bytes required to store a variable. |
![]() ![]() | Len(UInt64) | Returns an integer containing either the number of characters in a string or the nominal number of bytes required to store a variable. |
![]() ![]() | LSet(String, Int32) | Returns a left-aligned string containing the specified string adjusted to the specified length. |
![]() ![]() | LTrim(String) | Returns a string containing a copy of a specified string with no leading spaces (LTrim), no trailing spaces (RTrim), or no leading or trailing spaces (Trim). |
![]() ![]() | Mid(String, Int32) | Returns a string that contains all the characters starting from a specified position in a string. |
![]() ![]() | Mid(String, Int32, Int32) | Returns a string that contains a specified number of characters starting from a specified position in a string. |
![]() ![]() | Replace(String, String, String, Int32, Int32, CompareMethod) | Returns a string in which a specified substring has been replaced with another substring a specified number of times. |
![]() ![]() | Right(String, Int32) | Returns a string containing a specified number of characters from the right side of a string. |
![]() ![]() | RSet(String, Int32) | Returns a right-aligned string containing the specified string adjusted to the specified length. |
![]() ![]() | RTrim(String) | Returns a string containing a copy of a specified string with no leading spaces (LTrim), no trailing spaces (RTrim), or no leading or trailing spaces (Trim). |
![]() ![]() | Space(Int32) | Returns a string consisting of the specified number of spaces. |
![]() ![]() | Split(String, String, Int32, CompareMethod) | Returns a zero-based, one-dimensional array containing a specified number of substrings. |
![]() ![]() | StrComp(String, String, CompareMethod) | Returns -1, 0, or 1, based on the result of a string comparison. |
![]() ![]() | StrConv(String, VbStrConv, Int32) | Returns a string converted as specified. |
![]() ![]() | StrDup(Int32, Char) | Returns a string or object consisting of the specified character repeated the specified number of times. |
![]() ![]() | StrDup(Int32, Object) | Returns a string or object consisting of the specified character repeated the specified number of times. |
![]() ![]() | StrDup(Int32, String) | Returns a string or object consisting of the specified character repeated the specified number of times. |
![]() ![]() | StrReverse(String) | Returns a string in which the character order of a specified string is reversed. |
![]() | ToString() | Returns a string that represents the current object.(Inherited from Object.) |
![]() ![]() | Trim(String) | Returns a string containing a copy of a specified string with no leading spaces (LTrim), no trailing spaces (RTrim), or no leading or trailing spaces (Trim). |
![]() ![]() | UCase(Char) | Returns a string or character containing the specified string converted to uppercase. |
![]() ![]() | UCase(String) | Returns a string or character containing the specified string converted to uppercase. |
This module supports the Visual Basic language keywords and run-time library members that manipulate strings.
The following example demonstrates how to split a string at its spaces.
Dim TestString As String = "Look at these!" ' Returns an array containing "Look", "at", and "these!". Dim TestArray() As String = Split(TestString)
Available since 8
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone
Available since 8.1
Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

