Advances to the next multibyte character.
Note: The mbsadvance subroutine is specific to the manufacturer. It is not defined in the POSIX, ANSI, or X/Open standards. Use of this subroutine may affect portability.
#include <mbstr.h>
char *mbsadvance (S) const char *S;
The mbsadvance subroutine locates the next character in a multibyte character string. The LC_CTYPE category affects the behavior of the mbsadvance subroutine.
S | Contains a multibyte character string. |
If the S parameter is not a null pointer, the mbsadvance subroutine returns a pointer to the next multibyte character in the string pointed to by the S parameter. The character at the head of the string pointed to by the S parameter is skipped. If the S parameter is a null pointer or points to a null string, a null pointer is returned.
To find the next character in a multibyte string, use the following:
#include <mbstr.h> #include <locale.h> #include <stdlib.h>
main() { char *mbs, *pmbs; (void) setlocale(LC_ALL, ""); /* ** Let mbs point to the beginning of a multi-byte string. */ pmbs = mbs; while(pmbs){ pmbs = mbsadvance(mbs); /* pmbs points to the next multi-byte character ** in mbs */ }
This subroutine is part of Base Operating System (BOS) Runtime.
The mbsinvalid subroutine.
National Language Support Overview for Programming, Subroutines Overview in AIX Version 4.3 General Programming Concepts: Writing and Debugging Programs.