[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Technical Reference: Base Operating System and Extensions, Volume 1

mbswidth Subroutine

Purpose

Determines the number of multibyte character string display columns.

Note
The mbswidth subroutine is specific to this manufacturer. It is not defined in the POSIX, ANSI, or X/Open standards. Use of this subroutine may affect portability.

Library

Standard C Library (libc.a)

Syntax

#include <mbstr.h>


int mbswidth ( MbString Number)
const char *MbString;
size_t Number;

Description

The mbswidth subroutine determines the number of display columns required for a multibyte character string.

Parameters

MbString Contains a multibyte character string.
Number Specifies the number of bytes to read from the s parameter.

Return Values

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.

Related Information

The wcswidth subroutine, wcwidth subroutine.

National Language Support Overview in AIX 5L Version 5.2 National Language Support Guide and Reference.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]