[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 Base Operating System and Extensions Technical Reference, Volume 1

mblen Subroutine


Determines the length in bytes of a multibyte character.


Standard C Library (libc.a)


#include <stdlib.h>
int mblen(MbStringNumber)
const char *MbString;
size_t Number;


The mblen subroutine determines the length, in bytes, of a multibyte character.


Mbstring Points to a multibyte character string.
Number Specifies the maximum number of bytes to consider.

Return Values

The mblen subroutine returns 0 if the MbString parameter points to a null character. It returns -1 if a character cannot be formed from the number of bytes specified by the Number parameter. If MbString is a null pointer, 0 is returned.

Implementation Specifics

This subroutine is part of Base Operating System (BOS) Runtime.

Related Information

The mbslen subroutine, mbstowcs subroutine, mbtowc subroutine.

National Language Support Overview for Programming, Subroutines Overview, Understanding Multibyte Code and Wide Character Code Conversion Subroutines in AIX Version 4.3 General Programming Concepts: Writing and Debugging Programs.

[ Previous | Next | Contents | Glossary | Home | Search ]