UniQueryCompCharLen()--Composite Character Sequence Code Element Count API


  Syntax

  #include <UniChar.h>

  int UniQueryCompCharLen(void *reserved,
                          const UniChar *ucs,
                          size_t *element_count);

  Service Program: QTQULSFN

  Default Public Authority: *USE

  Threadsafe: No

The UniQueryCompCharLen--Composite Character Sequence Code Element Count function computes the number of code elements in the composite character sequence pointed to by ucs.

The function sets the number of code elements. This includes the non-combining character and the zero or more following combining characters up to, but not including, the next non-combining character or null code element into element_count.


Authorities and Locks

None.


Parameters

reserved
INPUT; PTR(SPP)

This parameter must be set to null.

ucs
INPUT; PTR(SPP)

The composite character sequence to be analyzed.

element_count
OUTPUT; PTR(SPP)

The number of code elements found in ucs. This is set to zero if the return value is not zero.


Return Value

zero
UniQueryCompCharLen function was successful. The value returned in element_count is the number of code elements in ucs.

non-zero
UniQueryCompCharLen was not successful and element_count is set to zero.

Error Conditions

If UniQueryCompCharLen is not successful, the return value indicates one of the following errors:

UNI_BADOBJ UniQueryCompCharLen function detected that the reserved parameter is not null.
UNI_INVALID UniQueryCompCharLen function detected that ucs is a null pointer.
UNI_NODATA UniQueryCompCharLen function detected that ucs points to a null code element.
UNI_COMP_FOUND UniQueryCompCharLen function detected that ucs points to a combining character.
UNI_RANGE UniQueryCompCharLen function detected that the value to be set in element_count was too large to fit.


API introduced: V3R6
Top | National Language Support APIs | APIs by category