NWLmblen

Returns the length of a multibyte character

NetWare Server:4.x, 5.x, 6.x
Platform:NLM, Windows NT, Windows 95, Windows 98
Library:Cross-Platform Localization (LOC*.*)
Service:Internationalization

Syntax

  #include <nwlocale.h> 
   
  nint N_API NWLmblen ( 
     const nstr N_FAR  *string,  
     size_t             maxBytes); 
  
  

Pascal Syntax

  uses netwin32 
   
  Function NWLmblen 
    (string : pnstr; 
     count : size_t 
  ) : nint; 
  
  

Parameters

string
(IN) Points to the string containing a character to evaluate.
count
(IN) Specifies the maximum number of bytes to evaluate.

Return Values

If the string parameter is not NULL, returns the length (in bytes) of the multibyte character.

If the string parameter is NULL, returns zero.

If the string does not form a valid multibyte character within the first count characters, returns -1.

Remarks

Generally, maxBytes is set to 2 and the function returns 1 for a 1-byte or 2 for a 2-byte character.

Use the NWLmbslen function to count the number of character is a string.

See Also

NWLmbslen