prevmb

Returns the address of the previous multibyte character.

Library:LibC
Classification:Novell
Service:General C Services

Syntax

  #include <stdlib.h> 
   
  char *prevmb (
     const char   *string);
  

Parameters

string

(IN) Points to a character in a multibyte string.

Return Values

Returns the address of the immediately previous character, whether single or double-byte.

Remarks

If the host configuration supports multibyte characters, the prevmb function uses the host table, as recorded by the library at start up, to determine the previous multibyte character. On NetWare, this is either the previous byte or the one before it, because NetWare supports only double-byte characters.

You must make sure that no call is made that returns an address pointing to a location before the start of the addressable memory or before the start of the string.

The prevmb function does not work accurately for strings in codepages other than the host page in force at the time this call is made. If the host locale on the server is modified between calls to this function, the result is entirely unpredictable (and almost certainly inaccurate).

See Also