15 references to Utf16Char
System.Runtime.Numerics (15)
System\Number.BigInteger.cs (7)
105
if (!TryStringToNumber(MemoryMarshal.Cast<char,
Utf16Char
>(value), style, ref number, info))
845
BigIntegerToDecChars((
Utf16Char
*)ptr + strLength, base1E9Value, digits);
863
BigIntegerToDecChars((
Utf16Char
*)ptr + span.Length, new ReadOnlySpan<uint>((void*)state.ptr, state.Length), state.digits);
884
scoped var vlb = new ValueListBuilder<
Utf16Char
>(stackalloc
Utf16Char
[CharStackBufferSize]); // arbitrary stack cut-off
897
spanSuccess = vlb.TryCopyTo(MemoryMarshal.Cast<char,
Utf16Char
>(destination), out charsWritten);
904
strResult = MemoryMarshal.Cast<
Utf16Char
, char>(vlb.AsSpan()).ToString();
System\Number.Polyfill.cs (8)
32
internal readonly struct Utf16Char(char ch) : IUtfChar<
Utf16Char
>
37
public static
Utf16Char
CastFrom(byte value) => new((char)value);
38
public static
Utf16Char
CastFrom(char value) => new(value);
39
public static
Utf16Char
CastFrom(int value) => new((char)value);
40
public static
Utf16Char
CastFrom(uint value) => new((char)value);
41
public static
Utf16Char
CastFrom(ulong value) => new((char)value);
42
public static uint CastToUInt32(
Utf16Char
value) => value.value;
43
public bool Equals(
Utf16Char
other) => value == other.value;