5 instantiations of Utf16Char
System.Runtime.Numerics (5)
System\Number.Polyfill.cs (5)
43
public static Utf16Char CastFrom(byte value) =>
new
((char)value);
44
public static Utf16Char CastFrom(char value) =>
new
(value);
45
public static Utf16Char CastFrom(int value) =>
new
((char)value);
46
public static Utf16Char CastFrom(uint value) =>
new
((char)value);
47
public static Utf16Char CastFrom(ulong value) =>
new
((char)value);
33 references to Utf16Char
System.Runtime.Numerics (33)
src\runtime\src\libraries\Common\src\System\Text\ValueStringBuilder_1.cs (3)
23
Debug.Assert((typeof(TChar) == typeof(Utf8Char)) || (typeof(TChar) == typeof(
Utf16Char
)));
32
Debug.Assert((typeof(TChar) == typeof(Utf8Char)) || (typeof(TChar) == typeof(
Utf16Char
)));
110
Debug.Assert(typeof(TChar) == typeof(
Utf16Char
));
System\Number.BigInteger.cs (6)
806
return FormatBigInteger<
Utf16Char
>(targetSpan: false, value, format, format, info, default, out _, out _)!;
847
Debug.Assert(typeof(TChar) == typeof(
Utf16Char
));
919
Debug.Assert(typeof(TChar) == typeof(
Utf16Char
));
938
BigIntegerToDecChars((
Utf16Char
*)ptr + span.Length, state.base1E9Value, state.digits);
986
Debug.Assert(typeof(TChar) == typeof(
Utf16Char
));
1588
Debug.Assert(typeof(TChar) == typeof(
Utf16Char
));
System\Number.Polyfill.cs (9)
38
internal readonly struct Utf16Char(char ch) : IUtfChar<
Utf16Char
>
43
public static
Utf16Char
CastFrom(byte value) => new((char)value);
44
public static
Utf16Char
CastFrom(char value) => new(value);
45
public static
Utf16Char
CastFrom(int value) => new((char)value);
46
public static
Utf16Char
CastFrom(uint value) => new((char)value);
47
public static
Utf16Char
CastFrom(ulong value) => new((char)value);
48
public static uint CastToUInt32(
Utf16Char
value) => value.value;
49
public bool Equals(
Utf16Char
other) => value == other.value;
129
Debug.Assert(typeof(TChar) == typeof(
Utf16Char
));
System\Numerics\BigInteger.cs (5)
831
return Number.ParseBigInteger(MemoryMarshal.Cast<char,
Utf16Char
>(value), style, NumberFormatInfo.GetInstance(provider));
846
return Number.TryParseBigInteger(MemoryMarshal.Cast<char,
Utf16Char
>(value), style, NumberFormatInfo.GetInstance(provider), out result, out _) == Number.ParsingStatus.OK;
862
return Number.TryParseBigIntegerPartial(MemoryMarshal.Cast<char,
Utf16Char
>(s.AsSpan()), style, NumberFormatInfo.GetInstance(provider), out result, out charsConsumed) == Number.ParsingStatus.OK;
874
return Number.TryParseBigIntegerPartial(MemoryMarshal.Cast<char,
Utf16Char
>(s), style, NumberFormatInfo.GetInstance(provider), out result, out charsConsumed) == Number.ParsingStatus.OK;
1881
return Number.TryFormatBigInteger(this, format, NumberFormatInfo.GetInstance(provider), MemoryMarshal.Cast<char,
Utf16Char
>(destination), out charsWritten);
System\Numerics\Complex.cs (5)
807
return Complex<double>.TryParse(MemoryMarshal.Cast<char,
Utf16Char
>(s), style, provider, out Unsafe.As<Complex, Complex<double>>(ref result), out _);
821
return Complex<double>.TryParsePartial(MemoryMarshal.Cast<char,
Utf16Char
>(s.AsSpan()), style, provider, out Unsafe.As<Complex, Complex<double>>(ref result), out charsConsumed);
835
return Complex<double>.TryParsePartial(MemoryMarshal.Cast<char,
Utf16Char
>(s), style, provider, out Unsafe.As<Complex, Complex<double>>(ref result), out charsConsumed);
867
TryFormat(MemoryMarshal.Cast<char,
Utf16Char
>(destination), out charsWritten, format, provider);
876
Debug.Assert(typeof(TChar) == typeof(Utf8Char) || typeof(TChar) == typeof(
Utf16Char
));
System\Numerics\Complex.Generic.cs (5)
1892
=> TryParse(MemoryMarshal.Cast<char,
Utf16Char
>(s), style, provider, out result, out _);
1900
=> TryParsePartial(MemoryMarshal.Cast<char,
Utf16Char
>(s.AsSpan()), style, provider, out result, out charsConsumed);
1908
=> TryParsePartial(MemoryMarshal.Cast<char,
Utf16Char
>(s), style, provider, out result, out charsConsumed);
2073
TryFormat(MemoryMarshal.Cast<char,
Utf16Char
>(destination), out charsWritten, format, provider);
2082
Debug.Assert(typeof(TChar) == typeof(Utf8Char) || typeof(TChar) == typeof(
Utf16Char
));