Strings Třída
Definice
StringsModul obsahuje postupy, které slouží k provádění operací s řetězci.The Strings module contains procedures used to perform string operations.
public ref class Strings sealed
[Microsoft.VisualBasic.CompilerServices.StandardModule]
public sealed class Strings
[<Microsoft.VisualBasic.CompilerServices.StandardModule>]
type Strings = class
Public Module Strings
- Dědičnost
-
Strings
- Atributy
Příklady
Následující příklad ukazuje, jak rozdělit řetězec ve svých prostorech.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)
Poznámky
Tento modul podporuje klíčová slova jazyka Visual Basic a členy běhové knihovny, které pracují s řetězci.This module supports the Visual Basic language keywords and run-time library members that manipulate strings.
Metody
| Asc(Char) |
Vrací celočíselnou hodnotu představující kód znaku odpovídající znaku.Returns an integer value representing the character code corresponding to a character. |
| Asc(String) |
Vrací celočíselnou hodnotu představující kód znaku odpovídající znaku.Returns an integer value representing the character code corresponding to a character. |
| AscW(Char) |
Vrací celočíselnou hodnotu představující kód znaku odpovídající znaku.Returns an integer value representing the character code corresponding to a character. |
| AscW(String) |
Vrací celočíselnou hodnotu představující kód znaku odpovídající znaku.Returns an integer value representing the character code corresponding to a character. |
| Chr(Int32) |
Vrátí znak přiřazený k určenému kódu znaku.Returns the character associated with the specified character code. |
| ChrW(Int32) |
Vrátí znak přiřazený k určenému kódu znaku.Returns the character associated with the specified character code. |
| Equals(Object) |
Určí, zda se zadaný objekt rovná aktuálnímu objektu.Determines whether the specified object is equal to the current object. (Zděděno od Object) |
| Filter(Object[], String, Boolean, CompareMethod) |
Vrací pole s nulovým základem obsahující podmnožinu |
| Filter(String[], String, Boolean, CompareMethod) |
Vrací pole s nulovým základem obsahující podmnožinu |
| Format(Object, String) |
Vrátí řetězec formátovaný podle pokynů obsažených ve |
| FormatCurrency(Object, Int32, TriState, TriState, TriState) |
Vrací výraz formátovaný jako hodnota měny pomocí symbolu měny definovaného na ovládacím panelu systému.Returns an expression formatted as a currency value using the currency symbol defined in the system control panel. |
| FormatDateTime(DateTime, DateFormat) |
Vrátí řetězcový výraz představující hodnotu data a času.Returns a string expression representing a date/time value. |
| FormatNumber(Object, Int32, TriState, TriState, TriState) |
Vrátí výraz formátovaný jako číslo.Returns an expression formatted as a number. |
| FormatPercent(Object, Int32, TriState, TriState, TriState) |
Vrátí výraz formátovaný jako procento (vynásobený 100) s koncovým znakem%.Returns an expression formatted as a percentage (that is, multiplied by 100) with a trailing % character. |
| GetChar(String, Int32) |
Vrací |
| GetHashCode() |
Slouží jako výchozí funkce hash.Serves as the default hash function. (Zděděno od Object) |
| GetType() |
Získá Type aktuální instanci.Gets the Type of the current instance. (Zděděno od Object) |
| InStr(Int32, String, String, CompareMethod) |
Vrací celé číslo určující počáteční pozici prvního výskytu jednoho řetězce v rámci druhého.Returns an integer specifying the start position of the first occurrence of one string within another. |
| InStr(String, String, CompareMethod) |
Vrací celé číslo určující počáteční pozici prvního výskytu jednoho řetězce v rámci druhého.Returns an integer specifying the start position of the first occurrence of one string within another. |
| InStrRev(String, String, Int32, CompareMethod) |
Vrátí pozici prvního výskytu jednoho řetězce v rámci druhého počínaje od pravé strany řetězce.Returns the position of the first occurrence of one string within another, starting from the right side of the string. |
| Join(Object[], String) |
Vrátí řetězec vytvořený spojením několika podřetězců obsažených v poli.Returns a string created by joining a number of substrings contained in an array. |
| Join(String[], String) |
Vrátí řetězec vytvořený spojením několika podřetězců obsažených v poli.Returns a string created by joining a number of substrings contained in an array. |
| LCase(Char) |
Vrátí řetězec nebo znak převedený na malá písmena.Returns a string or character converted to lowercase. |
| LCase(String) |
Vrátí řetězec nebo znak převedený na malá písmena.Returns a string or character converted to lowercase. |
| Left(String, Int32) |
Vrátí řetězec obsahující zadaný počet znaků od levé strany řetězce.Returns a string containing a specified number of characters from the left side of a string. |
| Len(Boolean) |
Vrátí celé číslo obsahující buď počet znaků v řetězci, nebo nominální počet bajtů potřebný k uložení proměnné.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) |
Vrátí celé číslo obsahující buď počet znaků v řetězci, nebo nominální počet bajtů potřebný k uložení proměnné.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) |
Vrátí celé číslo obsahující buď počet znaků v řetězci, nebo nominální počet bajtů potřebný k uložení proměnné.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) |
Vrátí celé číslo obsahující buď počet znaků v řetězci, nebo nominální počet bajtů potřebný k uložení proměnné.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) |
Vrátí celé číslo obsahující buď počet znaků v řetězci, nebo nominální počet bajtů potřebný k uložení proměnné.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) |
Vrátí celé číslo obsahující buď počet znaků v řetězci, nebo nominální počet bajtů potřebný k uložení proměnné.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) |
Vrátí celé číslo obsahující buď počet znaků v řetězci, nebo nominální počet bajtů potřebný k uložení proměnné.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) |
Vrátí celé číslo obsahující buď počet znaků v řetězci, nebo nominální počet bajtů potřebný k uložení proměnné.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) |
Vrátí celé číslo obsahující buď počet znaků v řetězci, nebo nominální počet bajtů potřebný k uložení proměnné.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) |
Vrátí celé číslo obsahující buď počet znaků v řetězci, nebo nominální počet bajtů potřebný k uložení proměnné.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) |
Vrátí celé číslo obsahující buď počet znaků v řetězci, nebo nominální počet bajtů potřebný k uložení proměnné.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) |
Vrátí celé číslo obsahující buď počet znaků v řetězci, nebo nominální počet bajtů potřebný k uložení proměnné.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) |
Vrátí celé číslo obsahující buď počet znaků v řetězci, nebo nominální počet bajtů potřebný k uložení proměnné.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) |
Vrátí celé číslo obsahující buď počet znaků v řetězci, nebo nominální počet bajtů potřebný k uložení proměnné.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) |
Vrátí celé číslo obsahující buď počet znaků v řetězci, nebo nominální počet bajtů potřebný k uložení proměnné.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) |
Vrátí celé číslo obsahující buď počet znaků v řetězci, nebo nominální počet bajtů potřebný k uložení proměnné.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) |
Vrátí řetězec zarovnaný doleva obsahující zadaný řetězec upravený na zadanou délku.Returns a left-aligned string containing the specified string adjusted to the specified length. |
| LTrim(String) |
Vrátí řetězec obsahující kopii zadaného řetězce bez mezer na začátku ( |
| MemberwiseClone() |
Vytvoří kopii aktuálního seznamu Object .Creates a shallow copy of the current Object. (Zděděno od Object) |
| Mid(String, Int32) |
Vrátí řetězec, který obsahuje všechny znaky od zadané pozice v řetězci.Returns a string that contains all the characters starting from a specified position in a string. |
| Mid(String, Int32, Int32) |
Vrátí řetězec, který obsahuje zadaný počet znaků od zadané pozice v řetězci.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) |
Vrátí řetězec, ve kterém byl zadaný dílčí řetězec nahrazen jiným dílčím řetězcem, který je určený počtem opakování.Returns a string in which a specified substring has been replaced with another substring a specified number of times. |
| Right(String, Int32) |
Vrátí řetězec obsahující zadaný počet znaků z pravé strany řetězce.Returns a string containing a specified number of characters from the right side of a string. |
| RSet(String, Int32) |
Vrátí řetězec zarovnaný doprava obsahující zadaný řetězec upravený na zadanou délku.Returns a right-aligned string containing the specified string adjusted to the specified length. |
| RTrim(String) |
Vrátí řetězec obsahující kopii zadaného řetězce bez mezer na začátku ( |
| Space(Int32) |
Vrátí řetězec sestávající z určeného počtu mezer.Returns a string consisting of the specified number of spaces. |
| Split(String, String, Int32, CompareMethod) |
Vrací jednorozměrné pole s nulovým základem obsahující určený počet podřetězců.Returns a zero-based, one-dimensional array containing a specified number of substrings. |
| StrComp(String, String, CompareMethod) |
Vrátí hodnotu-1, 0 nebo 1 na základě výsledku porovnání řetězců.Returns -1, 0, or 1, based on the result of a string comparison. |
| StrConv(String, VbStrConv, Int32) |
Vrátí řetězec převedený podle zadání.Returns a string converted as specified. |
| StrDup(Int32, Char) |
Vrátí řetězec nebo objekt skládající se ze zadaného znaku, který se opakuje po zadaném počtu opakování.Returns a string or object consisting of the specified character repeated the specified number of times. |
| StrDup(Int32, Object) |
Vrátí řetězec nebo objekt skládající se ze zadaného znaku, který se opakuje po zadaném počtu opakování.Returns a string or object consisting of the specified character repeated the specified number of times. |
| StrDup(Int32, String) |
Vrátí řetězec nebo objekt skládající se ze zadaného znaku, který se opakuje po zadaném počtu opakování.Returns a string or object consisting of the specified character repeated the specified number of times. |
| StrReverse(String) |
Vrátí řetězec, ve kterém je obráceno pořadí znaků zadaného řetězce.Returns a string in which the character order of a specified string is reversed. |
| ToString() |
Vrátí řetězec, který představuje aktuální objekt.Returns a string that represents the current object. (Zděděno od Object) |
| Trim(String) |
Vrátí řetězec obsahující kopii zadaného řetězce bez mezer na začátku ( |
| UCase(Char) |
Vrátí řetězec nebo znak obsahující určený řetězec převedený na velká písmena.Returns a string or character containing the specified string converted to uppercase. |
| UCase(String) |
Vrátí řetězec nebo znak obsahující určený řetězec převedený na velká písmena.Returns a string or character containing the specified string converted to uppercase. |