Utf8Parser.TryParse Metodo

Definizione

Overload

Nome Descrizione
TryParse(ReadOnlySpan<Byte>, Boolean, Int32, Char)

Analizza un oggetto Boolean all'inizio di una stringa Utf8.

TryParse(ReadOnlySpan<Byte>, Byte, Int32, Char)

Analizza un oggetto Byte all'inizio di una stringa Utf8.

TryParse(ReadOnlySpan<Byte>, DateTime, Int32, Char)

Analizza un oggetto DateTime all'inizio di una stringa Utf8.

TryParse(ReadOnlySpan<Byte>, DateTimeOffset, Int32, Char)

Analizza un oggetto DateTimeOffset all'inizio di una stringa Utf8.

TryParse(ReadOnlySpan<Byte>, Decimal, Int32, Char)

Analizza un oggetto Decimal all'inizio di una stringa Utf8.

TryParse(ReadOnlySpan<Byte>, Double, Int32, Char)

Analizza un oggetto Double all'inizio di una stringa Utf8.

TryParse(ReadOnlySpan<Byte>, Guid, Int32, Char)

Analizza un oggetto Guid all'inizio di una stringa Utf8.

TryParse(ReadOnlySpan<Byte>, Int16, Int32, Char)

Analizza un oggetto Int16 all'inizio di una stringa Utf8.

TryParse(ReadOnlySpan<Byte>, Int32, Int32, Char)

Analizza un oggetto Int32 all'inizio di una stringa Utf8.

TryParse(ReadOnlySpan<Byte>, Int64, Int32, Char)

Analizza un oggetto Int64 all'inizio di una stringa Utf8.

TryParse(ReadOnlySpan<Byte>, SByte, Int32, Char)

Analizza un oggetto SByte all'inizio di una stringa Utf8.

TryParse(ReadOnlySpan<Byte>, Single, Int32, Char)

Analizza un oggetto Single all'inizio di una stringa Utf8.

TryParse(ReadOnlySpan<Byte>, TimeSpan, Int32, Char)

Analizza un oggetto TimeSpan all'inizio di una stringa Utf8.

TryParse(ReadOnlySpan<Byte>, UInt16, Int32, Char)

Analizza un oggetto UInt16 all'inizio di una stringa Utf8.

TryParse(ReadOnlySpan<Byte>, UInt32, Int32, Char)

Analizza un oggetto UInt32 all'inizio di una stringa Utf8.

TryParse(ReadOnlySpan<Byte>, UInt64, Int32, Char)

Analizza un oggetto UInt64 all'inizio di una stringa Utf8.

TryParse(ReadOnlySpan<Byte>, Boolean, Int32, Char)

Origine:
Utf8Parser.Boolean.cs
Origine:
Utf8Parser.Boolean.cs
Origine:
Utf8Parser.Boolean.cs
Origine:
Utf8Parser.Boolean.cs
Origine:
Utf8Parser.Boolean.cs

Analizza un oggetto Boolean all'inizio di una stringa Utf8.

public static bool TryParse(ReadOnlySpan<byte> source, out bool value, out int bytesConsumed, char standardFormat = '\0');
static member TryParse : ReadOnlySpan<byte> * bool * int * char -> bool
Public Shared Function TryParse (source As ReadOnlySpan(Of Byte), ByRef value As Boolean, ByRef bytesConsumed As Integer, Optional standardFormat As Char = '\0') As Boolean

Parametri

source
ReadOnlySpan<Byte>

Stringa Utf8 da analizzare.

value
Boolean

Quando termina, il metodo contiene il valore analizzato da source, se l'operazione di analisi ha avuto esito positivo.

bytesConsumed
Int32

Se l'operazione di analisi ha avuto esito positivo, contiene la lunghezza in byte della sottostringa analizzata al termine del metodo. Se il metodo ha esito negativo, bytesConsumed è impostato su 0.

standardFormat
Char

Formato previsto della stringa Utf8. I formati supportati sono 'G', 'l'e default.

Valori restituiti

true per il successo; false se la stringa non è stata sintatticamente valida o si è verificato un overflow o un underflow.

Commenti

L'analisi non fa distinzione tra maiuscole e minuscole. Il parametro di formato viene convalidato per assicurarsi che sia supportato; tuttavia, tutti i formati supportati vengono trattati in modo identico.

Si applica a

TryParse(ReadOnlySpan<Byte>, Byte, Int32, Char)

Origine:
Utf8Parser.Integer.Unsigned.cs
Origine:
Utf8Parser.Integer.Unsigned.cs
Origine:
Utf8Parser.Integer.Unsigned.cs
Origine:
Utf8Parser.Integer.Unsigned.cs
Origine:
Utf8Parser.Integer.Unsigned.cs

Analizza un oggetto Byte all'inizio di una stringa Utf8.

public static bool TryParse(ReadOnlySpan<byte> source, out byte value, out int bytesConsumed, char standardFormat = '\0');
static member TryParse : ReadOnlySpan<byte> * byte * int * char -> bool
Public Shared Function TryParse (source As ReadOnlySpan(Of Byte), ByRef value As Byte, ByRef bytesConsumed As Integer, Optional standardFormat As Char = '\0') As Boolean

Parametri

source
ReadOnlySpan<Byte>

Stringa Utf8 da analizzare.

value
Byte

Quando termina, il metodo contiene il valore analizzato da source, se l'operazione di analisi ha avuto esito positivo.

bytesConsumed
Int32

Se l'operazione di analisi ha avuto esito positivo, contiene la lunghezza in byte della sottostringa analizzata al termine del metodo. Se il metodo ha esito negativo, bytesConsumed è impostato su 0.

standardFormat
Char

Formato previsto della stringa Utf8.

Valori restituiti

true per il successo; false se la stringa non è stata sintatticamente valida o si è verificato un overflow o un underflow.

Commenti

Formati supportati:

Stringa di formato Formato previsto di esempio
G/g (impostazione predefinita)
D/d 122
N/n 122
X/x 7a

Si applica a

TryParse(ReadOnlySpan<Byte>, DateTime, Int32, Char)

Origine:
Utf8Parser.Date.cs
Origine:
Utf8Parser.Date.cs
Origine:
Utf8Parser.Date.cs
Origine:
Utf8Parser.Date.cs
Origine:
Utf8Parser.Date.cs

Analizza un oggetto DateTime all'inizio di una stringa Utf8.

public static bool TryParse(ReadOnlySpan<byte> source, out DateTime value, out int bytesConsumed, char standardFormat = '\0');
static member TryParse : ReadOnlySpan<byte> * DateTime * int * char -> bool
Public Shared Function TryParse (source As ReadOnlySpan(Of Byte), ByRef value As DateTime, ByRef bytesConsumed As Integer, Optional standardFormat As Char = '\0') As Boolean

Parametri

source
ReadOnlySpan<Byte>

Stringa Utf8 da analizzare.

value
DateTime

Quando termina, il metodo contiene il valore analizzato da source, se l'operazione di analisi ha avuto esito positivo.

bytesConsumed
Int32

Se l'operazione di analisi ha avuto esito positivo, contiene la lunghezza in byte della sottostringa analizzata al termine del metodo. Se il metodo ha esito negativo, bytesConsumed è impostato su 0.

standardFormat
Char

Formato previsto della stringa Utf8.

Valori restituiti

true per il successo; false se la stringa non è stata sintatticamente valida o si è verificato un overflow o un underflow.

Commenti

Formati supportati:

Stringa di formato Formato previsto di esempio Comments
G (impostazione predefinita) 05/25/2017 10:30:15
R Mar, 03 Gennaio 2017 08:08:05 GMT (RFC 1123)
l tue, 03 gennaio 2017 08:08:05 gmt (RFC minuscolo 1123)
o 2017-06-12T05:30:45.7680000-07:00 (Round trippable)

Si applica a

TryParse(ReadOnlySpan<Byte>, DateTimeOffset, Int32, Char)

Origine:
Utf8Parser.Date.cs
Origine:
Utf8Parser.Date.cs
Origine:
Utf8Parser.Date.cs
Origine:
Utf8Parser.Date.cs
Origine:
Utf8Parser.Date.cs

Analizza un oggetto DateTimeOffset all'inizio di una stringa Utf8.

public static bool TryParse(ReadOnlySpan<byte> source, out DateTimeOffset value, out int bytesConsumed, char standardFormat = '\0');
static member TryParse : ReadOnlySpan<byte> * DateTimeOffset * int * char -> bool
Public Shared Function TryParse (source As ReadOnlySpan(Of Byte), ByRef value As DateTimeOffset, ByRef bytesConsumed As Integer, Optional standardFormat As Char = '\0') As Boolean

Parametri

source
ReadOnlySpan<Byte>

Stringa Utf8 da analizzare.

value
DateTimeOffset

Quando termina, il metodo contiene il valore analizzato da source, se l'operazione di analisi ha avuto esito positivo.

bytesConsumed
Int32

Se l'operazione di analisi ha avuto esito positivo, contiene la lunghezza in byte della sottostringa analizzata al termine del metodo. Se il metodo ha esito negativo, bytesConsumed è impostato su 0.

standardFormat
Char

Formato previsto della stringa Utf8.

Valori restituiti

true per il successo; false se la stringa non è stata sintatticamente valida o si è verificato un overflow o un underflow.

Commenti

Formati supportati:

Stringa di formato Formato previsto di esempio Comments
G (impostazione predefinita) 05/25/2017 10:30:15
R Mar, 03 Gennaio 2017 08:08:05 GMT (RFC 1123)
l tue, 03 gennaio 2017 08:08:05 gmt (RFC minuscolo 1123)
o 2017-06-12T05:30:45.7680000-07:00 (Round trippable)

Si applica a

TryParse(ReadOnlySpan<Byte>, Decimal, Int32, Char)

Origine:
Utf8Parser.Decimal.cs
Origine:
Utf8Parser.Decimal.cs
Origine:
Utf8Parser.Decimal.cs
Origine:
Utf8Parser.Decimal.cs
Origine:
Utf8Parser.Decimal.cs

Analizza un oggetto Decimal all'inizio di una stringa Utf8.

public static bool TryParse(ReadOnlySpan<byte> source, out decimal value, out int bytesConsumed, char standardFormat = '\0');
static member TryParse : ReadOnlySpan<byte> * decimal * int * char -> bool
Public Shared Function TryParse (source As ReadOnlySpan(Of Byte), ByRef value As Decimal, ByRef bytesConsumed As Integer, Optional standardFormat As Char = '\0') As Boolean

Parametri

source
ReadOnlySpan<Byte>

Stringa Utf8 da analizzare.

value
Decimal

Quando termina, il metodo contiene il valore analizzato da source, se l'operazione di analisi ha avuto esito positivo.

bytesConsumed
Int32

Se l'operazione di analisi ha avuto esito positivo, contiene la lunghezza in byte della sottostringa analizzata al termine del metodo. Se il metodo ha esito negativo, bytesConsumed è impostato su 0.

standardFormat
Char

Formato previsto della stringa Utf8.

Valori restituiti

true per il successo; false se la stringa non è stata sintatticamente valida o si è verificato un overflow o un underflow.

Commenti

Formati supportati:

Stringa di formato Formato previsto di esempio Comments
G/g (impostazione predefinita)
F/f 12.45 Punto fisso
E/e 1.245000e1 Esponenziale

Si applica a

TryParse(ReadOnlySpan<Byte>, Double, Int32, Char)

Origine:
Utf8Parser.Float.cs
Origine:
Utf8Parser.Float.cs
Origine:
Utf8Parser.Float.cs
Origine:
Utf8Parser.Float.cs
Origine:
Utf8Parser.Float.cs

Analizza un oggetto Double all'inizio di una stringa Utf8.

public static bool TryParse(ReadOnlySpan<byte> source, out double value, out int bytesConsumed, char standardFormat = '\0');
static member TryParse : ReadOnlySpan<byte> * double * int * char -> bool
Public Shared Function TryParse (source As ReadOnlySpan(Of Byte), ByRef value As Double, ByRef bytesConsumed As Integer, Optional standardFormat As Char = '\0') As Boolean

Parametri

source
ReadOnlySpan<Byte>

Stringa Utf8 da analizzare.

value
Double

Quando termina, il metodo contiene il valore analizzato da source, se l'operazione di analisi ha avuto esito positivo.

bytesConsumed
Int32

Se l'operazione di analisi ha avuto esito positivo, contiene la lunghezza in byte della sottostringa analizzata al termine del metodo. Se il metodo ha esito negativo, bytesConsumed è impostato su 0.

standardFormat
Char

Formato previsto della stringa Utf8.

Valori restituiti

true per il successo; false se la stringa non è stata sintatticamente valida o si è verificato un overflow o un underflow.

Commenti

Formati supportati:

Stringa di formato Formato previsto di esempio Comments
G/g (impostazione predefinita)
F/f 12.45 Punto fisso
E/e 1.245000e1 Esponenziale

Si applica a

TryParse(ReadOnlySpan<Byte>, Guid, Int32, Char)

Origine:
Utf8Parser.Guid.cs
Origine:
Utf8Parser.Guid.cs
Origine:
Utf8Parser.Guid.cs
Origine:
Utf8Parser.Guid.cs
Origine:
Utf8Parser.Guid.cs

Analizza un oggetto Guid all'inizio di una stringa Utf8.

public static bool TryParse(ReadOnlySpan<byte> source, out Guid value, out int bytesConsumed, char standardFormat = '\0');
static member TryParse : ReadOnlySpan<byte> * Guid * int * char -> bool
Public Shared Function TryParse (source As ReadOnlySpan(Of Byte), ByRef value As Guid, ByRef bytesConsumed As Integer, Optional standardFormat As Char = '\0') As Boolean

Parametri

source
ReadOnlySpan<Byte>

Stringa Utf8 da analizzare.

value
Guid

Quando termina, il metodo contiene il valore analizzato da source, se l'operazione di analisi ha avuto esito positivo.

bytesConsumed
Int32

Se l'operazione di analisi ha avuto esito positivo, contiene la lunghezza in byte della sottostringa analizzata al termine del metodo. Se il metodo ha esito negativo, bytesConsumed è impostato su 0.

standardFormat
Char

Formato previsto della stringa Utf8.

Valori restituiti

true per il successo; false se la stringa non è stata sintatticamente valida o si è verificato un overflow o un underflow.

Commenti

Formati supportati:

Stringa di formato Formato previsto
D (impostazione predefinita) nnnnnnnn-nnnn-nnnn-nnnn-nnnnnn
B {nnnnnnnn-nnnn-nnnn-nnnn-nnnnnnnnnn}
P (nnnnnnnn-nnnn-nnnn-nnnn-nnnnnnnnnnnn)
N nnnnnn

Si applica a

TryParse(ReadOnlySpan<Byte>, Int16, Int32, Char)

Origine:
Utf8Parser.Integer.Signed.cs
Origine:
Utf8Parser.Integer.Signed.cs
Origine:
Utf8Parser.Integer.Signed.cs
Origine:
Utf8Parser.Integer.Signed.cs
Origine:
Utf8Parser.Integer.Signed.cs

Analizza un oggetto Int16 all'inizio di una stringa Utf8.

public static bool TryParse(ReadOnlySpan<byte> source, out short value, out int bytesConsumed, char standardFormat = '\0');
static member TryParse : ReadOnlySpan<byte> * int16 * int * char -> bool
Public Shared Function TryParse (source As ReadOnlySpan(Of Byte), ByRef value As Short, ByRef bytesConsumed As Integer, Optional standardFormat As Char = '\0') As Boolean

Parametri

source
ReadOnlySpan<Byte>

Stringa Utf8 da analizzare.

value
Int16

Quando termina, il metodo contiene il valore analizzato da source, se l'operazione di analisi ha avuto esito positivo.

bytesConsumed
Int32

Se l'operazione di analisi ha avuto esito positivo, contiene la lunghezza in byte della sottostringa analizzata al termine del metodo. Se il metodo ha esito negativo, bytesConsumed è impostato su 0.

standardFormat
Char

Formato previsto della stringa Utf8.

Valori restituiti

true per il successo; false se la stringa non è stata sintatticamente valida o si è verificato un overflow o un underflow.

Commenti

Formati supportati:

Stringa di formato Formato previsto di esempio
G/g (impostazione predefinita)
D/d 32767
N/n 32,767
X/x 7fff

Si applica a

TryParse(ReadOnlySpan<Byte>, Int32, Int32, Char)

Origine:
Utf8Parser.Integer.Signed.cs
Origine:
Utf8Parser.Integer.Signed.cs
Origine:
Utf8Parser.Integer.Signed.cs
Origine:
Utf8Parser.Integer.Signed.cs
Origine:
Utf8Parser.Integer.Signed.cs

Analizza un oggetto Int32 all'inizio di una stringa Utf8.

public static bool TryParse(ReadOnlySpan<byte> source, out int value, out int bytesConsumed, char standardFormat = '\0');
static member TryParse : ReadOnlySpan<byte> * int * int * char -> bool
Public Shared Function TryParse (source As ReadOnlySpan(Of Byte), ByRef value As Integer, ByRef bytesConsumed As Integer, Optional standardFormat As Char = '\0') As Boolean

Parametri

source
ReadOnlySpan<Byte>

Stringa Utf8 da analizzare.

value
Int32

Quando termina, il metodo contiene il valore analizzato da source, se l'operazione di analisi ha avuto esito positivo.

bytesConsumed
Int32

Se l'operazione di analisi ha avuto esito positivo, contiene la lunghezza in byte della sottostringa analizzata al termine del metodo. Se il metodo ha esito negativo, bytesConsumed è impostato su 0.

standardFormat
Char

Formato previsto della stringa Utf8.

Valori restituiti

true per il successo; false se la stringa non è stata sintatticamente valida o si è verificato un overflow o un underflow.

Commenti

Formati supportati:

Stringa di formato Formato previsto di esempio
G/g (impostazione predefinita)
D/d 32767
N/n 32,767
X/x 7fff

Si applica a

TryParse(ReadOnlySpan<Byte>, Int64, Int32, Char)

Origine:
Utf8Parser.Integer.Signed.cs
Origine:
Utf8Parser.Integer.Signed.cs
Origine:
Utf8Parser.Integer.Signed.cs
Origine:
Utf8Parser.Integer.Signed.cs
Origine:
Utf8Parser.Integer.Signed.cs

Analizza un oggetto Int64 all'inizio di una stringa Utf8.

public static bool TryParse(ReadOnlySpan<byte> source, out long value, out int bytesConsumed, char standardFormat = '\0');
static member TryParse : ReadOnlySpan<byte> * int64 * int * char -> bool
Public Shared Function TryParse (source As ReadOnlySpan(Of Byte), ByRef value As Long, ByRef bytesConsumed As Integer, Optional standardFormat As Char = '\0') As Boolean

Parametri

source
ReadOnlySpan<Byte>

Stringa Utf8 da analizzare.

value
Int64

Quando termina, il metodo contiene il valore analizzato da source, se l'operazione di analisi ha avuto esito positivo.

bytesConsumed
Int32

Se l'operazione di analisi ha avuto esito positivo, contiene la lunghezza in byte della sottostringa analizzata al termine del metodo. Se il metodo ha esito negativo, bytesConsumed è impostato su 0.

standardFormat
Char

Formato previsto della stringa Utf8.

Valori restituiti

true per il successo; false se la stringa non è stata sintatticamente valida o si è verificato un overflow o un underflow.

Commenti

Formati supportati:

Stringa di formato Formato previsto di esempio
G/g (impostazione predefinita)
D/d 32767
N/n 32,767
X/x 7fff

Si applica a

TryParse(ReadOnlySpan<Byte>, SByte, Int32, Char)

Origine:
Utf8Parser.Integer.Signed.cs
Origine:
Utf8Parser.Integer.Signed.cs
Origine:
Utf8Parser.Integer.Signed.cs
Origine:
Utf8Parser.Integer.Signed.cs
Origine:
Utf8Parser.Integer.Signed.cs

Importante

Questa API non è conforme a CLS.

Analizza un oggetto SByte all'inizio di una stringa Utf8.

[System.CLSCompliant(false)]
public static bool TryParse(ReadOnlySpan<byte> source, out sbyte value, out int bytesConsumed, char standardFormat = '\0');
[<System.CLSCompliant(false)>]
static member TryParse : ReadOnlySpan<byte> * sbyte * int * char -> bool
Public Shared Function TryParse (source As ReadOnlySpan(Of Byte), ByRef value As SByte, ByRef bytesConsumed As Integer, Optional standardFormat As Char = '\0') As Boolean

Parametri

source
ReadOnlySpan<Byte>

Stringa Utf8 da analizzare.

value
SByte

Quando termina, il metodo contiene il valore analizzato da source, se l'operazione di analisi ha avuto esito positivo.

bytesConsumed
Int32

Se l'operazione di analisi ha avuto esito positivo, contiene la lunghezza in byte della sottostringa analizzata al termine del metodo. Se il metodo ha esito negativo, bytesConsumed è impostato su 0.

standardFormat
Char

Formato previsto della stringa Utf8.

Valori restituiti

true per il successo; false se la stringa non è stata sintatticamente valida o si è verificato un overflow o un underflow.

Attributi

Commenti

Formati supportati:

Stringa di formato Formato previsto di esempio
G/g (impostazione predefinita)
D/d 122
N/n 122
X/x 7a

Si applica a

TryParse(ReadOnlySpan<Byte>, Single, Int32, Char)

Origine:
Utf8Parser.Float.cs
Origine:
Utf8Parser.Float.cs
Origine:
Utf8Parser.Float.cs
Origine:
Utf8Parser.Float.cs
Origine:
Utf8Parser.Float.cs

Analizza un oggetto Single all'inizio di una stringa Utf8.

public static bool TryParse(ReadOnlySpan<byte> source, out float value, out int bytesConsumed, char standardFormat = '\0');
static member TryParse : ReadOnlySpan<byte> * single * int * char -> bool
Public Shared Function TryParse (source As ReadOnlySpan(Of Byte), ByRef value As Single, ByRef bytesConsumed As Integer, Optional standardFormat As Char = '\0') As Boolean

Parametri

source
ReadOnlySpan<Byte>

Stringa Utf8 da analizzare.

value
Single

Quando termina, il metodo contiene il valore analizzato da source, se l'operazione di analisi ha avuto esito positivo.

bytesConsumed
Int32

Se l'operazione di analisi ha avuto esito positivo, contiene la lunghezza in byte della sottostringa analizzata al termine del metodo. Se il metodo ha esito negativo, bytesConsumed è impostato su 0.

standardFormat
Char

Formato previsto della stringa Utf8.

Valori restituiti

true per il successo; false se la stringa non è stata sintatticamente valida o si è verificato un overflow o un underflow.

Commenti

Formati supportati:

Stringa di formato Formato previsto di esempio Comments
G/g (impostazione predefinita)
F/f 12.45 Punto fisso
E/e 1.245000e1 Esponenziale

Si applica a

TryParse(ReadOnlySpan<Byte>, TimeSpan, Int32, Char)

Origine:
Utf8Parser.TimeSpan.cs
Origine:
Utf8Parser.TimeSpan.cs
Origine:
Utf8Parser.TimeSpan.cs
Origine:
Utf8Parser.TimeSpan.cs
Origine:
Utf8Parser.TimeSpan.cs

Analizza un oggetto TimeSpan all'inizio di una stringa Utf8.

public static bool TryParse(ReadOnlySpan<byte> source, out TimeSpan value, out int bytesConsumed, char standardFormat = '\0');
static member TryParse : ReadOnlySpan<byte> * TimeSpan * int * char -> bool
Public Shared Function TryParse (source As ReadOnlySpan(Of Byte), ByRef value As TimeSpan, ByRef bytesConsumed As Integer, Optional standardFormat As Char = '\0') As Boolean

Parametri

source
ReadOnlySpan<Byte>

Stringa Utf8 da analizzare.

value
TimeSpan

Quando termina, il metodo contiene il valore analizzato da source, se l'operazione di analisi ha avuto esito positivo.

bytesConsumed
Int32

Se l'operazione di analisi ha avuto esito positivo, contiene la lunghezza in byte della sottostringa analizzata al termine del metodo. Se il metodo ha esito negativo, bytesConsumed è impostato su 0.

standardFormat
Char

Formato previsto della stringa Utf8.

Valori restituiti

true per il successo; false se la stringa non è stata sintatticamente valida o si è verificato un overflow o un underflow.

Commenti

Formati supportati:

Stringa di formato Formato previsto Comments
c/t/T (impostazione predefinita) [-][d.]hh:mm:ss[.fffffff] (formato costante)
G ^d:hh:mm:ss.fffffffff (lungo generale)
g [-][d:][h]h:mm:ss[.f[f[f[f[f[f[f]]]]]] (breve generale)

Si applica a

TryParse(ReadOnlySpan<Byte>, UInt16, Int32, Char)

Origine:
Utf8Parser.Integer.Unsigned.cs
Origine:
Utf8Parser.Integer.Unsigned.cs
Origine:
Utf8Parser.Integer.Unsigned.cs
Origine:
Utf8Parser.Integer.Unsigned.cs
Origine:
Utf8Parser.Integer.Unsigned.cs

Importante

Questa API non è conforme a CLS.

Analizza un oggetto UInt16 all'inizio di una stringa Utf8.

[System.CLSCompliant(false)]
public static bool TryParse(ReadOnlySpan<byte> source, out ushort value, out int bytesConsumed, char standardFormat = '\0');
[<System.CLSCompliant(false)>]
static member TryParse : ReadOnlySpan<byte> * uint16 * int * char -> bool
Public Shared Function TryParse (source As ReadOnlySpan(Of Byte), ByRef value As UShort, ByRef bytesConsumed As Integer, Optional standardFormat As Char = '\0') As Boolean

Parametri

source
ReadOnlySpan<Byte>

Stringa Utf8 da analizzare.

value
UInt16

Quando termina, il metodo contiene il valore analizzato da source, se l'operazione di analisi ha avuto esito positivo.

bytesConsumed
Int32

Se l'operazione di analisi ha avuto esito positivo, contiene la lunghezza in byte della sottostringa analizzata al termine del metodo. Se il metodo ha esito negativo, bytesConsumed è impostato su 0.

standardFormat
Char

Formato previsto della stringa Utf8.

Valori restituiti

true per il successo; false se la stringa non è stata sintatticamente valida o si è verificato un overflow o un underflow.

Attributi

Commenti

Formati supportati:

Stringa di formato Formato previsto di esempio
G/g (impostazione predefinita)
D/d 32767
N/n 32,767
X/x 7fff

Si applica a

TryParse(ReadOnlySpan<Byte>, UInt32, Int32, Char)

Origine:
Utf8Parser.Integer.Unsigned.cs
Origine:
Utf8Parser.Integer.Unsigned.cs
Origine:
Utf8Parser.Integer.Unsigned.cs
Origine:
Utf8Parser.Integer.Unsigned.cs
Origine:
Utf8Parser.Integer.Unsigned.cs

Importante

Questa API non è conforme a CLS.

Analizza un oggetto UInt32 all'inizio di una stringa Utf8.

[System.CLSCompliant(false)]
public static bool TryParse(ReadOnlySpan<byte> source, out uint value, out int bytesConsumed, char standardFormat = '\0');
[<System.CLSCompliant(false)>]
static member TryParse : ReadOnlySpan<byte> * uint32 * int * char -> bool
Public Shared Function TryParse (source As ReadOnlySpan(Of Byte), ByRef value As UInteger, ByRef bytesConsumed As Integer, Optional standardFormat As Char = '\0') As Boolean

Parametri

source
ReadOnlySpan<Byte>

Stringa Utf8 da analizzare.

value
UInt32

Quando termina, il metodo contiene il valore analizzato da source, se l'operazione di analisi ha avuto esito positivo.

bytesConsumed
Int32

Se l'operazione di analisi ha avuto esito positivo, contiene la lunghezza in byte della sottostringa analizzata al termine del metodo. Se il metodo ha esito negativo, bytesConsumed è impostato su 0.

standardFormat
Char

Formato previsto della stringa Utf8.

Valori restituiti

true per il successo; false se la stringa non è stata sintatticamente valida o si è verificato un overflow o un underflow.

Attributi

Commenti

Formati supportati:

Stringa di formato Formato previsto di esempio
G/g (impostazione predefinita)
D/d 32767
N/n 32,767
X/x 7fff

Si applica a

TryParse(ReadOnlySpan<Byte>, UInt64, Int32, Char)

Origine:
Utf8Parser.Integer.Unsigned.cs
Origine:
Utf8Parser.Integer.Unsigned.cs
Origine:
Utf8Parser.Integer.Unsigned.cs
Origine:
Utf8Parser.Integer.Unsigned.cs
Origine:
Utf8Parser.Integer.Unsigned.cs

Importante

Questa API non è conforme a CLS.

Analizza un oggetto UInt64 all'inizio di una stringa Utf8.

[System.CLSCompliant(false)]
public static bool TryParse(ReadOnlySpan<byte> source, out ulong value, out int bytesConsumed, char standardFormat = '\0');
[<System.CLSCompliant(false)>]
static member TryParse : ReadOnlySpan<byte> * uint64 * int * char -> bool
Public Shared Function TryParse (source As ReadOnlySpan(Of Byte), ByRef value As ULong, ByRef bytesConsumed As Integer, Optional standardFormat As Char = '\0') As Boolean

Parametri

source
ReadOnlySpan<Byte>

Stringa Utf8 da analizzare.

value
UInt64

Quando termina, il metodo contiene il valore analizzato da source, se l'operazione di analisi ha avuto esito positivo.

bytesConsumed
Int32

Se l'operazione di analisi ha avuto esito positivo, contiene la lunghezza in byte della sottostringa analizzata al termine del metodo. Se il metodo ha esito negativo, bytesConsumed è impostato su 0.

standardFormat
Char

Formato previsto della stringa Utf8.

Valori restituiti

true per il successo; false se la stringa non è stata sintatticamente valida o si è verificato un overflow o un underflow.

Attributi

Commenti

Formati supportati:

Stringa di formato Formato previsto di esempio
G/g (impostazione predefinita)
D/d 32767
N/n 32,767
X/x 7fff

Si applica a