wcswidth

Determines the number of printing positions on a display device that are required for a wide-character string.

Format

#include  <wchar.h>

int wcswidth  (const wchar_t *pwcs, size_t n);

Arguments

pwcs
A pointer to a wide-character string.
n
The maximum number of characters in the string.

Description

This function returns the number of printing positions required to display the first n characters of the string pointed to by pwcs. If there are less than n wide characters in the string, the function returns the number of positions required for the whole string.

Return Values
The number of printing positions required. 
If pwcs is a null character. 
- 1  Indicates that one (or more) of the wide characters in the string pointed to by pwcs is not a printable character. 


Previous Page | Next Page | Table of Contents | Index