Edytuj

Udostępnij za pośrednictwem


StringPool.TryGet(ReadOnlySpan<Char>, String) Method

Definition

Tries to get a cached String instance matching the input content, if present.

public bool TryGet (ReadOnlySpan<char> span, out string? value);
member this.TryGet : ReadOnlySpan<char> * string -> bool
Public Function TryGet (span As ReadOnlySpan(Of Char), ByRef value As String) As Boolean

Parameters

span
ReadOnlySpan<Char>

The input ReadOnlySpan<T> with the contents to use.

value
String

The resulting cached String instance, if present

Returns

Whether or not the target String instance was found.

Applies to