Logo Search packages:      
Sourcecode: icu version File versions

int32_t UnicodeString::countChar32 ( int32_t  start = 0,
int32_t  length = INT32_MAX 
) const

Count Unicode code points in the length UChar code units of the string. A code point may occupy either one or two UChar code units. Counting code points involves reading all code units.

This functions is basically the inverse of moveIndex32().

start the index of the first code unit to check
length the number of UChar code units to check
the number of code points in the specified code units
See also:
length ICU 2.0

Definition at line 692 of file unistr.cpp.

Referenced by NumberingSystem::createInstance(), and CanonicalIterator::permute().

  pinIndices(start, length);
  // if(isBogus()) then fArray==0 and start==0 - u_countChar32() checks for NULL
  return u_countChar32(getArrayStart()+start, length);

Generated by  Doxygen 1.6.0   Back to index