Performs operations on a specified number of null-terminated multibyte characters.
Note: These subroutines are specific to the manufacturer. They are not defined in the POSIX, ANSI, or X/Open standards. Use of these subroutines may affect portability.
#include <mbstr.h>
char *mbsncat(MbString1, MbString2, Number) char *MbString1, *MbString2; size_t Number;
int mbsncmp(MbString1, MbString2, Number) char *MbString1, *MbString2; size_t Number;
char *mbsncpy(MbString1, MbString2, Number) char *MbString1, *MbString2; size_t Number;
The mbsncat, mbsncmp, and mbsncpy subroutines operate on null-terminated multibyte character strings.
The mbsncat subroutine appends up to the specified maximum number of multibyte characters from the MbString2 parameter to the end of the MbString1 parameter, appends a null character to the result, and then returns the MbString1 parameter.
The mbsncmp subroutine compares the collation weights of multibyte characters. The LC_COLLATE category specifies the collation weights for all characters in a locale. The mbsncmp subroutine compares up to the specified maximum number of multibyte characters from the MbString1 parameter to the MbString2 parameter. It then returns an integer greater than 0 if MbString1 is greater than MbString2. It returns 0 if the strings are equivalent. It returns an integer less than 0 if MbString1 is less than MbString2.
The mbsncpy subroutine copies up to the value of the Number parameter of multibyte characters from the MbString2 parameter to the MbString1 parameter and returns MbString1. If MbString2 is shorter than Number multi-byte characters, MbString1 is padded out to Number characters with null characters.
MbString1 | Contains a multibyte character string. |
MbString2 | Contains a multibyte character string. |
Number | Specifies a maximum number of characters. |
These subroutines are part of Base Operating System (BOS) Runtime.
The mbscat subroutine, mbscmp subroutine, mbscpy subroutine, wcsncat subroutine, wcsncmp subroutine, wcsncpy subroutine.
National Language Support Overview for Programming, Subroutines Overview in AIX Version 4.3 General Programming Concepts: Writing and Debugging Programs.