Exemple #1
0
        /// <summary>
        /// Tests if given codepoint is a canonical decomposition of another
        /// codepoint.
        /// </summary>
        ///
        /// <param name="ch_0">- codepoint to test</param>
        /// <returns>true if ch is a decomposition.</returns>
        static internal bool HasSingleCodepointDecomposition(int ch_0)
        {
            int hasSingleDecomp = singleDecompTable.Get(ch_0);

            /*
             * singleDecompTable doesn't contain ch
             * == (hasSingleDecomp == singleDecompTableSize)
             */
            return((hasSingleDecomp == singleDecompTableSize) ? false : true);
        }
Exemple #2
0
        /// <summary>
        /// Gets canonical class for given codepoint from
        /// decomposition mappings table.
        /// </summary>
        ///
        /// <param name=" - ch Unicode codepoint"></param>
        /// <returns>canonical class for given Unicode codepoint
        /// that is represented by ch.</returns>
        static internal int GetCanonicalClass(int ch_0)
        {
            int canClass = canonClassesTable.Get(ch_0);

            return((canClass == canonClassesTableSize) ? 0 : canClass);
        }