Determines the number of multibyte character string display columns.
Standard C Library (libc.a)
The mbswidth subroutine determines the number of display columns required for a multibyte character string.
Item | Description |
---|---|
MbString | Contains a multibyte character string. |
Number | Specifies the number of bytes to read from the s parameter. |
The mbswidth subroutine returns the number of display columns that will be occupied by the MbString parameter if the number of bytes (specified by the Number parameter) read from the MbString parameter form valid multibyte characters. If the MbString parameter points to a null character, a value of 0 is returned. If the MbString parameter does not point to valid multibyte characters, -1 is returned. If the MbString parameter is a null pointer, the behavior of the mbswidth subroutine is unspecified.