Пример #1
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="highSurrogate">high surrogate code</param>
        /// <param name="lowSurrogate">low surrogate code</param>
        /// <param name="cjk">allow cjk mode</param>
        public UnicodeChar(char highSurrogate, char lowSurrogate, bool cjk)
        {
            uint             codePoint = Unicode.SurrogatePairToCodePoint(highSurrogate, lowSurrogate);
            UnicodeCharFlags flags     = Unicode.DetermineUnicodeCharFlags(codePoint, cjk);

            _bits = codePoint | (uint)flags;
        }
Пример #2
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="ch">a character</param>
        /// <param name="cjk">allow cjk mode</param>
        public UnicodeChar(char ch, bool cjk)
        {
            uint             codePoint = (uint)ch;
            UnicodeCharFlags flags     = Unicode.DetermineUnicodeCharFlags(codePoint, cjk);

            _bits = codePoint | (uint)flags;
        }