The ifx_gl_wcsrchr() function

The ifx_gl_wcsrchr() function searches for the last occurrence of a character in a wide-character string.

Syntax

#include <ifxgls.h>
...
gl_wchar_t *ifx_gl_wcsrchr(wcs, wcs_char_length, wc)
        gl_wchar_t *wcs;
        int wcs_char_length;
        gl_wchar_t wc;
wcs
A pointer to the wide-character string in which the function searches for wc.
wcs_char_length
The integer number of characters in the wcs string. If wcs_char_length is the value IFX_GL_NULL, the function assumes that wcs is a null-terminated string.
wc
A pointer to the wide character to search for in wcs.
Valid in client application Valid in DataBlade® UDR
Yes Yes

Usage

The ifx_gl_wcsrchr() function locates the last occurrence of wc in the wide character string wcs.

Return values

gl_wchar_t *
A pointer to the last occurrence of wc in wcs.
NULL
Either wc was not found in wcs (the ifx_gl_lc_errno() error number is set to 0); or the function was not successful, and the error number is set to indicate the cause. See the Errors section.

Errors

If an error occurred, this function returns NULL and sets the ifx_gl_lc_errno() error number to the following value.
IFX_GL_PARAMERR
The wcs_char_length is not equal to IFX_GL_NULL and is not greater than or equal to 0.