Пример #1
0
        /*================================= ConvertFromUtf32 ============================
        ** Convert an UTF32 value into a surrogate pair.
        ** ==============================================================================*/

        public static string ConvertFromUtf32(int utf32)
        {
            if (!UnicodeUtility.IsValidUnicodeScalar((uint)utf32))
            {
                throw new ArgumentOutOfRangeException(nameof(utf32), SR.ArgumentOutOfRange_InvalidUTF32);
            }

            return(Rune.UnsafeCreate((uint)utf32).ToString());
        }