dbcs_width

Measures the width of a character in the specified code page.

Library:LibC
Service:Characters and Strings

Syntax

  #include <unilib.h> 
   
  int dbcs_width (
     int           codepage,
     const char   *str );
  

Parameters

codepage

(IN) Specifies the code page. For a list of code pages, see Section 12.1, Supported Code Pages.

str

(IN) Points to a string with characters to evaluate.

Return Values

If successful, returns the width of the code page characters (either 1 for single-byte or 2 for double- byte characters). Otherwise, returns a negative error code.

Decimal

Name

Description

-496

UNI_ERR_BAD_HANDLE

The codepage parameter specifies an unsupported value.

See Also