Strings Class

 

The Strings module contains procedures used to perform string operations.

Namespace:   Microsoft.VisualBasic
Assembly:  Microsoft.VisualBasic (in Microsoft.VisualBasic.dll)

System.Object
  Microsoft.VisualBasic.Strings

<StandardModuleAttribute>
Public NotInheritable Class Strings

NameDescription
System_CAPS_pubmethodSystem_CAPS_staticAsc(Char)

Returns an Integer value representing the character code corresponding to a character.

System_CAPS_pubmethodSystem_CAPS_staticAsc(String)

Returns an Integer value representing the character code corresponding to a character.

System_CAPS_pubmethodSystem_CAPS_staticAscW(Char)

Returns an Integer value representing the character code corresponding to a character.

System_CAPS_pubmethodSystem_CAPS_staticAscW(String)

Returns an Integer value representing the character code corresponding to a character.

System_CAPS_pubmethodSystem_CAPS_staticChr(Int32)

Returns the character associated with the specified character code.

System_CAPS_pubmethodSystem_CAPS_staticChrW(Int32)

Returns the character associated with the specified character code.

System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_pubmethodSystem_CAPS_staticFilter(Object(), String, Boolean, CompareMethod)

Returns a zero-based array containing a subset of a String array based on specified filter criteria.

System_CAPS_pubmethodSystem_CAPS_staticFilter(String(), String, Boolean, CompareMethod)

Returns a zero-based array containing a subset of a String array based on specified filter criteria.

System_CAPS_pubmethodSystem_CAPS_staticFormat(Object, String)

Returns a string formatted according to instructions contained in a format String expression.

System_CAPS_pubmethodSystem_CAPS_staticFormatCurrency(Object, Int32, TriState, TriState, TriState)

Returns an expression formatted as a currency value using the currency symbol defined in the system control panel.

System_CAPS_pubmethodSystem_CAPS_staticFormatDateTime(DateTime, DateFormat)

Returns a string expression representing a date/time value.

System_CAPS_pubmethodSystem_CAPS_staticFormatNumber(Object, Int32, TriState, TriState, TriState)

Returns an expression formatted as a number.

System_CAPS_pubmethodSystem_CAPS_staticFormatPercent(Object, Int32, TriState, TriState, TriState)

Returns an expression formatted as a percentage (that is, multiplied by 100) with a trailing % character.

System_CAPS_pubmethodSystem_CAPS_staticGetChar(String, Int32)

Returns a Char value representing the character from the specified index in the supplied string.

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodSystem_CAPS_staticInStr(Int32, String, String, CompareMethod)

Returns an integer specifying the start position of the first occurrence of one string within another.

System_CAPS_pubmethodSystem_CAPS_staticInStr(String, String, CompareMethod)

Returns an integer specifying the start position of the first occurrence of one string within another.

System_CAPS_pubmethodSystem_CAPS_staticInStrRev(String, String, Int32, CompareMethod)

Returns the position of the first occurrence of one string within another, starting from the right side of the string.

System_CAPS_pubmethodSystem_CAPS_staticJoin(Object(), String)

Returns a string created by joining a number of substrings contained in an array.

System_CAPS_pubmethodSystem_CAPS_staticJoin(String(), String)

Returns a string created by joining a number of substrings contained in an array.

System_CAPS_pubmethodSystem_CAPS_staticLCase(Char)

Returns a string or character converted to lowercase.

System_CAPS_pubmethodSystem_CAPS_staticLCase(String)

Returns a string or character converted to lowercase.

System_CAPS_pubmethodSystem_CAPS_staticLeft(String, Int32)

Returns a string containing a specified number of characters from the left side of a string.

System_CAPS_pubmethodSystem_CAPS_staticLen(Boolean)

Returns an integer containing either the number of characters in a string or the nominal number of bytes required to store a variable.

System_CAPS_pubmethodSystem_CAPS_staticLen(Byte)

Returns an integer containing either the number of characters in a string or the nominal number of bytes required to store a variable.

System_CAPS_pubmethodSystem_CAPS_staticLen(Char)

Returns an integer containing either the number of characters in a string or the nominal number of bytes required to store a variable.

System_CAPS_pubmethodSystem_CAPS_staticLen(DateTime)

Returns an integer containing either the number of characters in a string or the nominal number of bytes required to store a variable.

System_CAPS_pubmethodSystem_CAPS_staticLen(Decimal)

Returns an integer containing either the number of characters in a string or the nominal number of bytes required to store a variable.

System_CAPS_pubmethodSystem_CAPS_staticLen(Double)

Returns an integer containing either the number of characters in a string or the nominal number of bytes required to store a variable.

System_CAPS_pubmethodSystem_CAPS_staticLen(Int16)

Returns an integer containing either the number of characters in a string or the nominal number of bytes required to store a variable.

System_CAPS_pubmethodSystem_CAPS_staticLen(Int32)

Returns an integer containing either the number of characters in a string or the nominal number of bytes required to store a variable.

System_CAPS_pubmethodSystem_CAPS_staticLen(Int64)

Returns an integer containing either the number of characters in a string or the nominal number of bytes required to store a variable.

System_CAPS_pubmethodSystem_CAPS_staticLen(Object)

Returns an integer containing either the number of characters in a string or the nominal number of bytes required to store a variable.

System_CAPS_pubmethodSystem_CAPS_staticLen(SByte)

Returns an integer containing either the number of characters in a string or the nominal number of bytes required to store a variable.

System_CAPS_pubmethodSystem_CAPS_staticLen(Single)

Returns an integer containing either the number of characters in a string or the nominal number of bytes required to store a variable.

System_CAPS_pubmethodSystem_CAPS_staticLen(String)

Returns an integer containing either the number of characters in a string or the nominal number of bytes required to store a variable.

System_CAPS_pubmethodSystem_CAPS_staticLen(UInt16)

Returns an integer containing either the number of characters in a string or the nominal number of bytes required to store a variable.

System_CAPS_pubmethodSystem_CAPS_staticLen(UInt32)

Returns an integer containing either the number of characters in a string or the nominal number of bytes required to store a variable.

System_CAPS_pubmethodSystem_CAPS_staticLen(UInt64)

Returns an integer containing either the number of characters in a string or the nominal number of bytes required to store a variable.

System_CAPS_pubmethodSystem_CAPS_staticLSet(String, Int32)

Returns a left-aligned string containing the specified string adjusted to the specified length.

System_CAPS_pubmethodSystem_CAPS_staticLTrim(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).

System_CAPS_pubmethodSystem_CAPS_staticMid(String, Int32)

Returns a string that contains all the characters starting from a specified position in a string.

System_CAPS_pubmethodSystem_CAPS_staticMid(String, Int32, Int32)

Returns a string that contains a specified number of characters starting from a specified position in a string.

System_CAPS_pubmethodSystem_CAPS_staticReplace(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.

System_CAPS_pubmethodSystem_CAPS_staticRight(String, Int32)

Returns a string containing a specified number of characters from the right side of a string.

System_CAPS_pubmethodSystem_CAPS_staticRSet(String, Int32)

Returns a right-aligned string containing the specified string adjusted to the specified length.

System_CAPS_pubmethodSystem_CAPS_staticRTrim(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).

System_CAPS_pubmethodSystem_CAPS_staticSpace(Int32)

Returns a string consisting of the specified number of spaces.

System_CAPS_pubmethodSystem_CAPS_staticSplit(String, String, Int32, CompareMethod)

Returns a zero-based, one-dimensional array containing a specified number of substrings.

System_CAPS_pubmethodSystem_CAPS_staticStrComp(String, String, CompareMethod)

Returns -1, 0, or 1, based on the result of a string comparison.

System_CAPS_pubmethodSystem_CAPS_staticStrConv(String, VbStrConv, Int32)

Returns a string converted as specified.

System_CAPS_pubmethodSystem_CAPS_staticStrDup(Int32, Char)

Returns a string or object consisting of the specified character repeated the specified number of times.

System_CAPS_pubmethodSystem_CAPS_staticStrDup(Int32, Object)

Returns a string or object consisting of the specified character repeated the specified number of times.

System_CAPS_pubmethodSystem_CAPS_staticStrDup(Int32, String)

Returns a string or object consisting of the specified character repeated the specified number of times.

System_CAPS_pubmethodSystem_CAPS_staticStrReverse(String)

Returns a string in which the character order of a specified string is reversed.

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

System_CAPS_pubmethodSystem_CAPS_staticTrim(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).

System_CAPS_pubmethodSystem_CAPS_staticUCase(Char)

Returns a string or character containing the specified string converted to uppercase.

System_CAPS_pubmethodSystem_CAPS_staticUCase(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)

Universal Windows Platform
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.

Return to top
Show: