public bool TryFormat(Span <char> destination, out int charsWritten, ReadOnlySpan <char> format = default, IFormatProvider provider = null) { if (m_value < 0 && format.Length > 0 && (format[0] == 'X' || format[0] == 'x')) { uint temp = (uint)(m_value & 0x0000FFFF); return(Number.TryFormatUInt32(temp, format, provider, destination, out charsWritten)); } return(Number.TryFormatInt32(m_value, format, provider, destination, out charsWritten)); }
public bool TryFormat(Span <char> destination, out int charsWritten, string format = null, IFormatProvider provider = null) { NumberFormatInfo info = NumberFormatInfo.GetInstance(provider); if (m_value < 0 && format != null && format.Length > 0 && (format[0] == 'X' || format[0] == 'x')) { uint temp = (uint)(m_value & 0x0000FFFF); return(Number.TryFormatUInt32(temp, format, info, destination, out charsWritten)); } return(Number.TryFormatInt32(m_value, format, info, destination, out charsWritten)); }
public bool TryFormat(Span <char> destination, out int charsWritten, ReadOnlySpan <char> format = default, IFormatProvider provider = null) { return(Number.TryFormatUInt32(m_value, format, provider, destination, out charsWritten)); }
public bool TryFormat(Span <char> destination, out int charsWritten, [StringSyntax(StringSyntaxAttribute.NumericFormat)] ReadOnlySpan <char> format = default, IFormatProvider?provider = null) { return(Number.TryFormatUInt32(m_value, format, provider, destination, out charsWritten)); }
public bool TryFormat(Span <char> destination, out int charsWritten, string format = null, IFormatProvider provider = null) { return(Number.TryFormatUInt32(m_value, format, NumberFormatInfo.GetInstance(provider), destination, out charsWritten)); }