NWNextChar(3nw)


NWNextChar -- increments pointer to next character in string with multi-byte characters

Synopsis

   #include <time.h> or #define NWL_EXCLUDE_TIME 
   #include <stdio.h> or #define NWL_EXCLUDE_FILE 
   #include <nwlocale.h> 
   

char NWFAR *NWAPI NWNextChar (char NWFAR *string);

Description

The parameters are as follows:

string
(IN) Points to the address of the current position in the string. If there is no next character, string points to the null character at the end of the string.

Return values

Pointer to the next character (not byte) in the specified string.

Notices

NWNextChar is called to move through strings whose characters are one or two bytes each in length. For example, NWNextChar could be called for string containing characters from a Japanese character set.

In a multi-byte string, it is not obvious whether the current byte is a single-byte character or the second character of a double-byte character. NWNextChar resolves this ambiguity.

Call NWNextChar in place of ptr++.

NWNextChar is implemented as a call to AnsiNext in Windows.

Services

Internationalization

NCP calls

None

References

NWLsetlocale(3nw), NWIncrement(3nw), NWPrevChar(3nw)
30 January 1998
© 1998 The Santa Cruz Operation, Inc. All rights reserved.