src/ccutil/unicharcompress.cpp
bool UnicharCompress::DecomposeHangul(int unicode, int *leading, int *vowel, int *trailing) {
  if (unicode < kFirstHangul) {
    return false;
  }
  int offset = unicode - kFirstHangul;
  if (offset >= kNumHangul) {
    return false;
  }
  const int kNCount = kVCount * kTCount;
  *leading = offset / kNCount;
  *vowel = (offset % kNCount) / kTCount;
  *trailing = offset % kTCount;
  return true;
}
// Helper decomposes a Hangul unicode to 3 parts, leading, vowel, trailing.
// Note that the returned values are 0-based indices, NOT unicode Jamo.
// Returns false if the input is not in the Hangul unicode range.
/* static */
Helper decomposes a Hangul unicode to 3 parts, leading, vowel, trailing.
Note that the returned values are 0-based indices, NOT unicode Jamo.
Returns false if the input is not in the Hangul unicode range.
static
Helper decomposes a Hangul unicode to 3 parts leading vowel trailing . Note that the returned values are 0 - based indices NOT unicode Jamo . Returns false if the input is not in the Hangul unicode range . static
bool UnicharCompress::DecomposeHangul(int unicode, int *leading, int *vowel, int *trailing) {
  if (unicode < kFirstHangul) {
    return false;
  }
  int offset = unicode - kFirstHangul;
  if (offset >= kNumHangul) {
    return false;
  }
  const int kNCount = kVCount * kTCount;
  *leading = offset / kNCount;
  *vowel = (offset % kNCount) / kTCount;
  *trailing = offset % kTCount;
  return true;
}
bool UnicharCompress :: DecomposeHangul ( int unicode , int * leading , int * vowel , int * trailing ) { if ( unicode < kFirstHangul ) { return false ; } int offset = unicode - kFirstHangul ; if ( offset >= kNumHangul ) { return false ; } const int kNCount = kVCount * kTCount ; * leading = offset / kNCount ; * vowel = ( offset % kNCount ) / kTCount ; * trailing = offset % kTCount ; return true ; }
Helper decomposes a Hangul unicode to 3 parts, leading, vowel, trailing.
Helper decomposes a Hangul unicode to 3 parts leading vowel trailing .