NWPrevChar(3nw)
NWPrevChar --
finds the beginning of the nearest previous character in a 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 NWPrevChar
(const char NWFAR
string,
char NWFAR
position);
Description
The parameters are as follows:
- string
-
(IN) Points to the beginning of the string.
- position
-
(IN) Points to a character in the null-terminated string.
Return values
- 0x0000
-
string is NULL.
- Non-zero
-
Pointer to the previous character in the string. If position is
equal to string, this non-zero value points to the first character
in the string.
Notices
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. NWPrevChar resolves
this ambiguity.
Services
Internationalization
NCP calls
None
References
NWLsetlocale(3nw),
NWNextChar(3nw)
30 January 1998
© 1998 The Santa Cruz Operation, Inc. All rights reserved.