SemPtr SemPtr
SemPtr SemPtr
Documentation generated with DocFX
Using SingulinkFX as the template

Search Results for

    Method TryFormat

    TryFormat(Span<char>, out int, IFormatProvider?)

    Tries to format the value of the current instance into the provided span of characters.

    Declaration
    public bool TryFormat(Span<char> destination, out int charsWritten, IFormatProvider? provider = null)
    Parameters
    Type Name Description
    Span<char> destination

    The span in which to write this instance's value formatted as a span of characters.

    int charsWritten

    When this method returns, contains the number of characters that were written in destination.

    IFormatProvider provider

    An optional object that supplies culture-specific formatting information for destination.

    Returns
    Type Description
    bool

    true if the formatting was successful; otherwise, false.

    TryFormat(Span<char>, out int, ReadOnlySpan<char>, IFormatProvider?)

    Tries to format the value of the current instance into the provided span of characters.

    Declaration
    public bool TryFormat(Span<char> destination, out int charsWritten, ReadOnlySpan<char> format, IFormatProvider? provider = null)
    Parameters
    Type Name Description
    Span<char> destination

    The span in which to write this instance's value formatted as a span of characters.

    int charsWritten

    When this method returns, contains the number of characters that were written in destination.

    ReadOnlySpan<char> format

    A span containing the characters that represent a standard or custom format string that defines the acceptable format for destination.

    IFormatProvider provider

    An optional object that supplies culture-specific formatting information for destination.

    Returns
    Type Description
    bool

    true if the formatting was successful; otherwise, false.

    Implements
    ISpanFormattable.TryFormat(Span<char>, out int, ReadOnlySpan<char>, IFormatProvider)

    TryFormat(Span<byte>, out int, IFormatProvider?)

    Tries to format the value of the current instance as UTF-8 into the provided span of bytes.

    Declaration
    public bool TryFormat(Span<byte> destination, out int bytesWritten, IFormatProvider? provider = null)
    Parameters
    Type Name Description
    Span<byte> destination
    int bytesWritten

    When this method returns, contains the number of bytes that were written in utf8Destination.

    IFormatProvider provider

    An optional object that supplies culture-specific formatting information for utf8Destination.

    Returns
    Type Description
    bool

    true if the formatting was successful; otherwise, false.

    TryFormat(Span<byte>, out int, ReadOnlySpan<char>, IFormatProvider?)

    Tries to format the value of the current instance as UTF-8 into the provided span of bytes.

    Declaration
    public bool TryFormat(Span<byte> destination, out int bytesWritten, ReadOnlySpan<char> format, IFormatProvider? provider = null)
    Parameters
    Type Name Description
    Span<byte> destination
    int bytesWritten

    When this method returns, contains the number of bytes that were written in utf8Destination.

    ReadOnlySpan<char> format

    A span containing the characters that represent a standard or custom format string that defines the acceptable format for utf8Destination.

    IFormatProvider provider

    An optional object that supplies culture-specific formatting information for utf8Destination.

    Returns
    Type Description
    bool

    true if the formatting was successful; otherwise, false.

    Implements
    IUtf8SpanFormattable.TryFormat(Span<byte>, out int, ReadOnlySpan<char>, IFormatProvider)
    © 2026 Felix Rüdiger. SemPtr and its documentation are licensed under the MIT license.