NWPrevChar

Finds the beginning of the nearest previous character in a string with multibyte characters

NetWare Server:4.x, 5.x, 6.x
Platform:NLM, Windows NT, Windows 95, Windows 98
Library:Cross-Platform Localization (LOC*.*)
Service:Internationalization

Syntax

  #include <time.h> or #define NWL_EXCLUDE_TIME 
  #include <stdio.h> or #define NWL_EXCLUDE_FILE 
  #include <nwlocale.h> 
   
  pnstr N_API NWPrevChar  ( 
     const nstr N_FAR  *string,  
     pnstr              position); 
  
  

Pascal Syntax

  uses netwin32 
   
  Function NWPrevChar 
    (const str : pnstr; 
     position : pnstr 
  ) : pnstr; 
  
  

Parameters

string
(IN) Points to the beginning of the string.
position
(IN) Points to a character in the NULL-terminated string.

Return Values

0x0000

The string parameter is NULL

non-zero

Pointer to the previous character in the string. If the position parameter is equal to the string parameter, this value points to the first character in the string

Remarks

In a multibyte 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.

See Also

NWLsetlocale, NWNextChar