This commit is contained in:
Genevieve Warren 2024-08-02 16:09:58 -07:00 коммит произвёл GitHub
Родитель a43acee003
Коммит 2a2668e58a
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
3 изменённых файлов: 64 добавлений и 65 удалений

Просмотреть файл

@ -92,7 +92,7 @@ In .NET, a <xref:System.String> object can include embedded null characters, whi
- The value returned by the `strlen` or `wcslen` functions does not necessarily equal <xref:System.String.Length%2A?displayProperty=nameWithType>.
- The string created by the `strcpy_s` or `wcscpy_s` functions is not necessarily identical to the string created by the <xref:System.String.Copy%2A?displayProperty=nameWithType> method.
- The string created by the `strcpy_s` or `wcscpy_s` functions is not necessarily identical to the string being copied.
You should ensure that native C and C++ code that instantiates <xref:System.String> objects, and code that is passed <xref:System.String> objects through platform invoke, don't assume that an embedded null character marks the end of the string.
@ -450,7 +450,6 @@ For detailed information about formatting operations and examples, see the <xref
You can call the following <xref:System.String> methods to make a copy of a string:
- <xref:System.String.Clone%2A> returns a reference to an existing <xref:System.String> object.
- <xref:System.String.Copy%2A> creates a copy of an existing string.
- <xref:System.String.CopyTo%2A> copies a portion of a string to a character array.
### Normalize a string

Просмотреть файл

@ -31,7 +31,7 @@ There are several different ways to analyze and manipulate your strings. Some of
[!code-vb[VbVbalrStrings#45](~/samples/snippets/visualbasic/VS_Snippets_VBCSharp/VbVbalrStrings/VB/Class2.vb#45)]
In the preceding example, the <xref:System.String.Copy%2A?displayProperty=nameWithType> method is a static method, which acts upon an expression it is given and assigns the resulting value to `bString`.
In the preceding example, the <xref:System.String.Compare%2A?displayProperty=nameWithType> method is a shared method that accepts two instances of `String` as arguments.
#### Instance Methods

Просмотреть файл

@ -42,7 +42,7 @@ Class Class0bb85ddaa37f4a9799b48b344c5437be
Public Sub Method45()
' <snippet45>
Dim aString As String = String.Copy("A literal string")
Dim equal As Boolean = (String.Compare("Hello", "Goodbye") = 0)
' </snippet45>
End Sub