NWNextChar

Increments a pointer to the next 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 NWNextChar  ( 
     const nstr N_FAR  *string); 
  
  

Pascal Syntax

  uses netwin32 
   
  Function NWNextChar 
    (const str : pnstr 
  ) : pnstr; 
  
  

Parameters

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.

Remarks

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

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. NWNextChar resolves this ambiguity.

Increment a pointer with he statement ptr=NWNextChar(ptr) instead of ptr++.

The NWNextChar function is implemented as a call to AnsiNext in Windows.

See Also

NWLsetlocale, NWIncrement, NWPrevChar