Logo Search packages:      
Sourcecode: fuse-umfuse-fat version File versions  Download package

int unicode_utf16le_len ( uint16_t  lead_word  ) 

Gets the length of a UTF-16LE character.

Parameters:
lead_word the first uint16_t of a UTF-16 character;
Return values:
>0 the length in uint16_t units of the UTF-16 character;
Remarks:
For performance reasons, this function does not parse the whole UTF-16 word sequence, just the first uint16_t. If checking the validity of the whole UTF-16 word sequence is needed, use unicode_utf16le_to_wchar().

This is the little endian version of unicode_utf16be_len()

Definition at line 51 of file utf16le.c.

{
      if ((little_endian_16(lead_word) & 0xFC00) == 0xD800) return 2;
      return 1;
}


Generated by  Doxygen 1.6.0   Back to index