The MCharLen method

This method returns the number of bytes in the multibyte character s.

int MCharLen(const char *s, int nbytes = ITLocale::ScanToNul) const

The nbytes parameter specifies the length of the corresponding multibyte character s. You can provide an integer to specify the number of bytes in s, in which case this method reads up to this many bytes from s when trying to form a complete character. Or you can set nbytes to ITLocale::ScanNoLimit (the default), in which case this method reads as many bytes as necessary to form a complete character.

If there is an error, this method returns -1. Call ITLocale::GetError() to retrieve a specific error message.