INFORMIX
INFORMIX-GLS Programmer's Guide
Chapter 4: INFORMIX-GLS Function Descriptions
Home Contents Index Master Index New Book

ifx_gl_ismalnum()

The ifx_gl_ismalnum() function determines whether a multibyte character contains an alphabetic or digit character.

Syntax

Usage

The ifx_gl_ismalnum() function tests whether mb is in the alnum character class (either the alpha or digit class) according to the rules of the current locale. The alpha class contains all characters from the upper and lower classes. The digit class contains only the 10 ASCII digit characters: '0' to '9' (ASCII 0x030 to 0x039).

To determine whether a multibyte character is defined only in the alpha class, use the ifx_gl_ismalpha() function. To determine whether a multibyte character is defined only in the digit class, use the ifx_gl_ismdigit() function.

Locale Information

The LC_CTYPE category of the current locale affects the behavior of this function because it defines the alnum character class.

Return Values

>0

The *mb character is in the alpha or digit character class.

0

The function was not successful, and the error number is set to indicate the cause. See the Errors section.

Errors

This function does not return a unique value to indicate an error. If an error occurred, the function returns zero (0) and sets the ifx_gl_lc_errno() error number to one of the following values.
IFX_GL_EILSEQ

The *mb value is not a valid multibyte character.

IFX_GL_EINVAL

The function cannot determine whether mb is a valid multibyte character because it would need to read more than mb_byte_limit bytes from mb. If mb_byte_limit is less than or equal to zero, this function always returns this error. For more information about this error, see "Keeping Multibyte Strings Consistent".

Related Topics

See the descriptions of the following functions: ifx_gl_ismalpha(), ifx_gl_ismdigit(), ifx_gl_ismlower(), ifx_gl_ismupper(), ifx_gl_iswalnum(), and ifx_gl_lc_errno().

For a description of character classification, see "Character Classification".

ifx_gl_ismalpha()

The ifx_gl_ismalpha() function determines whether a multibyte character contains an alphabetic character.

Syntax

Usage

The ifx_gl_ismalpha() function tests whether mb is in the alpha character class according to the rules of the current locale. The alpha class contains all characters from the upper and lower classes. In addition to the uppercase and lowercase Latin-based characters, this class includes any alphabetic characters that the locale might define, including:

Characters in the alpha class are also in the graph and print classes. No characters in the digit, blank, space, punct or cntrl classes are in this class.

To determine the case of an alphabetic multibyte character, you can use the ifx_gl_ismupper() and ifx_gl_ismlower() functions. Use the ifx_gl_ismalnum() function to test whether a multibyte character is an alphabetic character or a digit.

Locale Information

The LC_CTYPE category of the current locale affects the behavior of this function because it defines the alpha character class.

Return Values

>0

The *mb character is in the alpha character class.

0

The function was not successful, and the error number is set to indicate the cause. See the Errors section.

Errors

This function does not return a unique value to indicate an error. If an error occurred, the function returns zero (0) and sets the ifx_gl_lc_errno() error number to one of the following values.
IFX_GL_EILSEQ

The *mb value is not a valid multibyte character.

IFX_GL_EINVAL

The function cannot determine whether mb is a valid multibyte character because it would need to read more than mb_byte_limit bytes from mb. If mb_byte_limit is less than or equal to zero, this function always returns this error. For more information about this error, see "Keeping Multibyte Strings Consistent".

Related Topics

See the descriptions of the following functions: ifx_gl_ismalnum(), ifx_gl_ismgraph(), ifx_gl_ismlower(), ifx_gl_ismprint(), ifx_gl_ismupper(), ifx_gl_iswalpha(), ifx_gl_lc_errno(), ifx_gl_tomlower(), and ifx_gl_tomupper().

For a description of character classification, see "Character Classification".

ifx_gl_ismblank()

The ifx_gl_ismblank() function determines whether a multibyte character contains a horizontal-space character.

Syntax

Usage

The ifx_gl_ismblank() function tests whether mb is in the blank character class according to the rules of the current locale. The blank character class includes the single-byte space (ASCII 0x020) and tab character (ASCII 0x009, ^I) plus any multibyte version of these characters that the locale defines. Characters in the blank class are also in the space class. No characters in the upper, lower, alpha, digit, xdigit, punct, or graph classes are in the blank class.

Locale Information

The LC_CTYPE category of the current locale affects the behavior of this function because it defines the blank character class.

Return Values

>0

The *mb character is in the blank character class.

0

The function was not successful, and the error number is set to indicate the cause. See the Errors section.

Errors

This function does not return a unique value to indicate an error. If an error occurred, the function returns zero (0) and sets the ifx_gl_lc_errno() error number to one of the following values.
IFX_GL_EILSEQ

The *mb value is not a valid multibyte character.

IFX_GL_EINVAL

The function cannot determine whether mb is a valid multibyte character because it would need to read more than mb_byte_limit bytes from mb. If mb_byte_limit is less than or equal to zero, this function always returns this error. For more information about this error, see "Keeping Multibyte Strings Consistent".

Related Topics

See the descriptions of the following functions: ifx_gl_ismspace(), ifx_gl_iswblank(), and ifx_gl_lc_errno().

For a description of character classification, see "Character Classification".

ifx_gl_ismcntrl()

The ifx_gl_ismcntrl() function determines whether a multibyte character contains a control character.

Syntax

Usage

The ifx_gl_ismcntrl() function tests whether mb is in the cntrl character class according to the rules of the current locale. The cntrl character class contains the single-byte control characters: alert, backspace, tab, newline, vertical-tab, form-feed, carriage-return, NUL, SOH, STX, ETX, EOT, ENQ, ACK, SO, SI, DLE, DC1, DC2, DC3, DC4, NAK, SYN, ETB, CAN, EM, SUB, ESC, IS4, IS3, IS2, IS1, and DEL. These characters are the ASCII characters whose code points are in the range 0x00 to 0x1F. In addition, the cntrl class contains any other control characters that the locale might define.

No characters in the upper, lower, alpha, digit, xdigit, punct, graph, or print classes are in the cntrl class.

Locale Information

The LC_CTYPE category of the current locale affects the behavior of this function because it defines the cntrl character class.

Return Values

>0

The *mb character is in the cntrl character class.

0

The function was not successful, and the error number is set to indicate the cause. See the Errors section.

Errors

This function does not return a unique value to indicate an error. If an error occurred, the function returns zero (0) and sets the ifx_gl_lc_errno() error number to one of the following values.
IFX_GL_EILSEQ

The *mb value is not a valid multibyte character.

IFX_GL_EINVAL

The function cannot determine whether mb is a valid multibyte character because it would need to read more than mb_byte_limit bytes from mb. If mb_byte_limit is less than or equal to zero, this function always returns this error. For more information about this error, see "Keeping Multibyte Strings Consistent".

Related Topics

See the descriptions of the following functions: ifx_gl_iswcntrl() and ifx_gl_lc_errno().

For a description of character classification, see "Character Classification".

ifx_gl_ismdigit()

The ifx_gl_ismdigit() function determines whether a multibyte character contains a decimal digit.

Syntax

Usage

The ifx_gl_ismdigit() function tests whether mb is in the digit character class according to the rules of the current locale. The digit character class contains only the 10 ASCII digit characters (ASCII 0x030 to 0x039). Any multibyte versions or alternative representations of these digits that the locale might define (for example, Hindi or Kanji digits) are not in this class. Instead, they are in the alpha class.

Characters in this class are also in the xdigit, graph, and print classes. No characters in the upper, lower, alpha, blank, space, punct, or cntrl classes are in this class.

To determine whether a multibyte character contains a hexadecimal digit, you can use the ifx_gl_ismxdigit() function. Use the ifx_gl_ismalnum() function to test whether a multibyte character is an alphabetic character or a digit.

Locale Information

The LC_CTYPE category of the current locale affects the behavior of this function because it defines the digit character class.

Return Values

>0

The *mb character is in the digit character class.

0

The function was not successful, and the error number is set to indicate the cause. See the Errors section.

Errors

This function does not return a unique value to indicate an error. If an error occurred, the function returns zero (0) and sets the ifx_gl_lc_errno() error number to one of the following values.
IFX_GL_EILSEQ

The *mb value is not a valid multibyte character.

IFX_GL_EINVAL

The function cannot determine whether mb is a valid multibyte character because it would need to read more than mb_byte_limit bytes from mb. If mb_byte_limit is less than or equal to zero, this function always returns this error. For more information about this error, see "Keeping Multibyte Strings Consistent".

Related Topics

See the descriptions of the following functions: ifx_gl_ismalnum(), ifx_gl_ismalpha(), ifx_gl_ismgraph(), ifx_gl_ismprint(), ifx_gl_ismxdigit(), ifx_gl_iswdigit(), and ifx_gl_lc_errno().

For a description of character classification, see "Character Classification".

ifx_gl_ismgraph()

The ifx_gl_ismgraph() function determines whether a multibyte character contains a graphical (visible) character.

Syntax

Usage

The ifx_gl_ismgraph() function tests whether mb is in the graph character class according to the rules of the current locale. The graph character class contains all characters that have a visual representation, including characters from the alpha, digit, punct, and xdigit classes. In addition, all round-trip code-set-conversion placeholder characters are in this class.

Characters in the graph class are also in the print class. No characters in the blank, space, or cntrl classes are in the graph class.

Locale Information

The LC_CTYPE category of the current locale affects the behavior of this function because it defines the graph character class.

Return Values

>0

The *mb character is in the graph character class.

0

The function was not successful, and the error number is set to indicate the cause. See the Errors section.

Errors

This function does not return a unique value to indicate an error. If an error occurred, the function returns zero (0) and sets the ifx_gl_lc_errno() error number to one of the following values.
IFX_GL_EILSEQ

The *mb value is not a valid multibyte character.

IFX_GL_EINVAL

The function cannot determine whether mb is a valid multibyte character because it would need to read more than mb_byte_limit bytes from mb. If mb_byte_limit is less than or equal to zero, this function always returns this error. For more information about this error, see "Keeping Multibyte Strings Consistent".

Related Topics

See the descriptions of the following functions: ifx_gl_ismalnum(), ifx_gl_ismalpha(), ifx_gl_ismdigit(), ifx_gl_ismlower(), ifx_gl_ismprint(), ifx_gl_ismpunct(), ifx_gl_ismupper(), ifx_gl_ismxdigit(), ifx_gl_iswgraph(), and ifx_gl_lc_errno().

For a description of character classification, see "Character Classification".

ifx_gl_ismlower()

The ifx_gl_ismlower() function determines whether a multibyte character contains a lowercase alphabetic character.

Syntax

Usage

The ifx_gl_ismlower() function tests whether mb is in the lower character class according to the rules of the current locale. The lower character class contains:

Characters in this class are also in the alpha, graph, and print classes. No characters in the upper, digit, blank, space, punct, or cntrl classes are in this class.

To determine the uppercase equivalent of an alphabetic multibyte character, you can use the ifx_gl_tomupper() function. Use the ifx_gl_ismalpha() function to test whether a multibyte character is an alphabetic character (uppercase or lowercase).

Locale Information

The LC_CTYPE category of the current locale affects the behavior of this function because it defines the lower character class.

Return Values

>0

The *mb character is in the lower character class.

0

The function was not successful, and the error number is set to indicate the cause. See the Errors section.

Errors

This function does not return a unique value to indicate an error. If an error occurred, the function returns zero (0) and sets the ifx_gl_lc_errno() error number to one of the following values.
IFX_GL_EILSEQ

The *mb value is not a valid multibyte character.

IFX_GL_EINVAL

The function cannot determine whether mb is a valid multibyte character because it would need to read more than mb_byte_limit bytes from mb. If mb_byte_limit is less than or equal to zero, this function always returns this error. For more information about this error, see "Keeping Multibyte Strings Consistent".

Related Topics

See the descriptions of the following functions: ifx_gl_ismalnum(), ifx_gl_ismalpha(), ifx_gl_ismgraph(), ifx_gl_ismprint(), ifx_gl_ismupper(), ifx_gl_iswlower(), ifx_gl_lc_errno(), and ifx_gl_tomupper().

For a description of character classification, see "Character Classification".

ifx_gl_ismprint()

The ifx_gl_ismprint() function determines whether a multibyte character contains a printable character.

Syntax

Usage

The ifx_gl_ismprint() function tests whether mb is in the print character class according to the rules of the current locale. The print character class contains all characters that have a visual representation or are in the space class but not in the cntrl class.

All characters from the alpha, digit, punct, xdigit, and graph classes are also in this class. No characters in the cntrl class are in this class.

Locale Information

The LC_CTYPE category of the current locale affects the behavior of this function because it defines the print character class.

Return Values

>0

The *mb character is in the print character class.

0

The function was not successful, and the error number is set to indicate the cause. See the Errors section.

Errors

This function does not return a unique value to indicate an error. If an error occurred, the function returns zero (0) and sets the ifx_gl_lc_errno() error number to one of the following values.
IFX_GL_EILSEQ

The *mb value is not a valid multibyte character.

IFX_GL_EINVAL

The function cannot determine whether mb is a valid multibyte character because it would need to read more than mb_byte_limit bytes from mb. If mb_byte_limit is less than or equal to zero, this function always returns this error. For more information about this error, see "Keeping Multibyte Strings Consistent".

Related Topics

See the descriptions of the following functions: ifx_gl_ismalnum(), ifx_gl_ismalpha(), ifx_gl_ismdigit(), ifx_gl_ismgraph(), ifx_gl_ismlower(), ifx_gl_ismpunct(), ifx_gl_ismupper(), ifx_gl_ismxdigit(), ifx_gl_iswprint(), and ifx_gl_lc_errno().

For a description of character classification, see "Character Classification".

ifx_gl_ismpunct()

The ifx_gl_ismpunct() function determines whether a multibyte character contains a punctuation character.

Syntax

Usage

The ifx_gl_ismpunct() function tests whether mb is in the punct character class according to the rules of the current locale. The punct character class contains the following characters:

Graphic characters that are not really punctuation characters have traditionally been put in the punct class; instead they are in the graph class. Characters in this class are also in the graph and print classes. No characters in the upper, lower, alpha, digit, xdigit, blank, space, or cntrl classes are in this class.

Locale Information

The LC_CTYPE category of the current locale affects the behavior of this function because it defines the punct character class.

Return Values

>0

The *mb character is in the punct character class.

0

The function was not successful, and the error number is set to indicate the cause. See the Errors section.

Errors

This function does not return a unique value to indicate an error. If an error occurred, the function returns zero (0) and sets the ifx_gl_lc_errno() error number to one of the following values.
IFX_GL_EILSEQ

The *mb value is not a valid multibyte character.

IFX_GL_EINVAL

The function cannot determine whether mb is a valid multibyte character because it would need to read more than mb_byte_limit bytes from mb. If mb_byte_limit is less than or equal to zero, this function always returns this error. For more information about this error, see "Keeping Multibyte Strings Consistent".

Related Topics

See the descriptions of the following functions: ifx_gl_ismgraph(), ifx_gl_ismprint(), ifx_gl_iswpunct(), and ifx_gl_lc_errno().

For a description of character classification, see "Character Classification".

ifx_gl_ismspace()

The ifx_gl_ismspace() function determines whether a multibyte character contains a space (vertical or horizontal) character.

Syntax

Usage

The ifx_gl_ismspace() function tests whether mb is in the space character class according to the rules of the current locale. The space character class contains:

No characters in the alpha, digit, xdigit, punct, or graph classes are in this class.

Locale Information

The LC_CTYPE category of the current locale affects the behavior of this function because it defines the space character class.

Return Values

>0

The *mb character is in the space character class.

0

The function was not successful, and the error number is set to indicate the cause. See the Errors section.

Errors

This function does not return a unique value to indicate an error. If an error occurred, the function returns zero (0) and sets the ifx_gl_lc_errno() error number to one of the following values.
IFX_GL_EILSEQ

The *mb value is not a valid multibyte character.

IFX_GL_EINVAL

The function cannot determine whether mb is a valid multibyte character because it would need to read more than mb_byte_limit bytes from mb. If mb_byte_limit is less than or equal to zero, this function always returns this error. For more information about this error, see "Keeping Multibyte Strings Consistent".

Related Topics

See the descriptions of the following functions: ifx_gl_ismblank(), ifx_gl_iswspace(), and ifx_gl_lc_errno().

For a description of character classification, see "Character Classification".

ifx_gl_ismupper()

The ifx_gl_ismupper() function determines whether a multibyte character contains an uppercase alphabetic character.

Syntax

Usage

The ifx_gl_ismupper() function tests whether mb is in the upper character class according to the rules of the current locale. The upper character class contains:

Characters in this class are also in the alpha, graph, and print classes. No characters in the lower, digit, blank, space, punct, or cntrl classes are in this class.

To determine the lowercase equivalent of an alphabetic multibyte character, you can use the ifx_gl_tomlower() function. Use the ifx_gl_ismalpha() function to test whether a multibyte character is an alphabetic character (uppercase or lowercase).

Locale Information

The LC_CTYPE category of the current locale affects the behavior of this function because it defines the upper character class.

Return Values

>0

The mb character is in the upper character class.

0

The function was not successful, and the error number is set to indicate the cause. See the Errors section.

Errors

This function does not return a unique value to indicate an error. If an error occurred, the function returns zero (0) and sets the ifx_gl_lc_errno() error number to one of the following values.
IFX_GL_EILSEQ

The *mb value is not a valid multibyte character.

IFX_GL_EINVAL

The function cannot determine whether mb is a valid multibyte character because it would need to read more than mb_byte_limit bytes from mb. If mb_byte_limit is less than or equal to zero, this function always returns this error. For more information about this error, see "Keeping Multibyte Strings Consistent".

Related Topics

See the descriptions of the following functions: ifx_gl_ismalnum(), ifx_gl_ismalpha(), ifx_gl_ismgraph(), ifx_gl_ismlower(), ifx_gl_ismprint(), ifx_gl_iswupper(), ifx_gl_lc_errno(), and ifx_gl_tomupper().

For a description of character classification, see "Character Classification".

ifx_gl_ismxdigit()

The ifx_gl_ismxdigit() function determines whether a multibyte character contains a hexadecimal digit.

Syntax

Usage

The ifx_gl_ismxdigit() function tests whether mb is in the xdigit character class according to the rules of the current locale. The xdigit character class contains:

Any multibyte versions or alternative representations of these hexadecimal digits that the locale might define (for example, Hindi or Kanji digits) are not in this class. Instead, they are in the alpha class.

Characters in this class are also in the graph and print classes. No characters in the blank, space, punct, or cntrl classes are in this class.

To determine whether a multibyte character contains a decimal digit, you can use the ifx_gl_ismdigit() function. Use the ifx_gl_ismalnum() function to test whether a multibyte character contains an alphabetic character or a digit.

Locale Information

The LC_CTYPE category of the current locale affects the behavior of this function because it defines the xdigit character class.

Return Values

>0

The mb character is in the xdigit character class.

0

The function was not successful, and the error number is set to indicate the cause. See the Errors section.

Errors

This function does not return a unique value to indicate an error. If an error occurred, the function returns zero (0) and sets the ifx_gl_lc_errno() error number to one of the following values.
IFX_GL_EILSEQ

The *mb value is not a valid multibyte character.

IFX_GL_EINVAL

The function cannot determine whether mb is a valid multibyte character because it would need to read more than mb_byte_limit bytes from mb. If mb_byte_limit is less than or equal to zero, this function always returns this error. For more information about this error, see "Keeping Multibyte Strings Consistent".

Related Topics

See the descriptions of the following functions: ifx_gl_ismalnum(), ifx_gl_ismalpha(), ifx_gl_ismdigit(), ifx_gl_ismgraph(), ifx_gl_ismprint(), ifx_gl_iswxdigit(), and ifx_gl_lc_errno().

For a description of character classification, see "Character Classification".

ifx_gl_iswalnum()

The ifx_gl_iswalnum() function determines whether a wide character contains an alphabetic or digit character.

Syntax

Usage

The ifx_gl_iswalnum() function tests whether wc is in the alnum character class (either the alpha or digit class) according to the rules of the current locale. The alpha class contains all characters from the upper and lower classes. The digit class contains only the 10 ASCII digit characters: '0' to '9' (ASCII 0x030 to 0x039).

To determine whether a wide character is defined only in the alpha class, use the ifx_gl_iswalpha() function. To determine whether a wide character is defined only in the digit class, use the ifx_gl_iswdigit() function.

Locale Information

The LC_CTYPE category of the current locale affects the behavior of this function because it defines the alnum character class.

Return Values

>0

The wc character is in the digit character class.

0

The function was not successful, and the error number is set to indicate the cause. See the Errors section.

Errors

This function does not return a unique value to indicate an error. If an error occurred, the function returns zero (0) and sets the ifx_gl_lc_errno() error number to the following value.
IFX_GL_EILSEQ

The *wc value is not a valid wide character.

Related Topics

See the descriptions of the following functions: ifx_gl_ismalnum(), ifx_gl_iswalpha(), ifx_gl_iswdigit(), ifx_gl_iswlower(), ifx_gl_iswupper(), and ifx_gl_lc_errno().

For a description of character classification, see "Character Classification".

ifx_gl_iswalpha()

The ifx_gl_iswalpha() function determines whether a wide character contains an alphabetic character.

Syntax

Usage

The ifx_gl_iswalpha() function tests whether wc is in the alpha character class according to the rules of the current locale. The alpha class contains all characters from the upper and lower classes. In addition to the uppercase and lowercase Latin-based characters, this class includes any alphabetic characters that the locale might define, including:

Characters in the alpha class are also in the graph and print classes. No characters in the digit, blank, space, punct, or cntrl classes are in this class.

To determine the case of a wide alphabetic character, you can use the ifx_gl_iswupper() and ifx_gl_iswlower() functions. Use the ifx_gl_iswalnum() function to test whether a wide character is an alphabetic character or a digit.

Locale Information

The LC_CTYPE category of the current locale affects the behavior of this function because it defines the alpha character class.

Return Values

>0

The wc character is in the digit character class.

0

The function was not successful, and the error number is set to indicate the cause. See the Errors section.

Errors

This function does not return a unique value to indicate an error. If an error occurred, the function returns zero (0) and sets the ifx_gl_lc_errno() error number to the following value.
IFX_GL_EILSEQ

The *wc value is not a valid wide character.

Related Topics

See the descriptions of the following functions: ifx_gl_ismalpha(), ifx_gl_iswalnum(), ifx_gl_iswgraph(), ifx_gl_iswlower(), ifx_gl_iswprint(), ifx_gl_iswupper(), ifx_gl_lc_errno(), ifx_gl_towlower(), and ifx_gl_towupper().

For a description of character classification, see "Character Classification".

ifx_gl_iswblank()

The ifx_gl_iswblank() function determines whether a wide character contains a horizontal-space character.

Syntax

Usage

The ifx_gl_iswblank() function tests whether wc is in the blank character class according to the rules of the current locale. The blank character class includes the single-byte space (ASCII 0x020) and tab character (ASCII 0x009, ^I) plus any multibyte version of these characters that the locale defines. Characters in the blank class are also in the space class. No characters in the upper, lower, alpha, digit, xdigit, punct, or graph classes are in the blank class.

Locale Information

The LC_CTYPE category of the current locale affects the behavior of this function because it defines the blank character class.

Return Values

>0

The wc character is in the digit character class.

0

The function was not successful, and the error number is set to indicate the cause. See the Errors section.

Errors

This function does not return a unique value to indicate an error. If an error occurred, the function returns zero (0) and sets the ifx_gl_lc_errno() error number to the following value.
IFX_GL_EILSEQ

The *wc value is not a valid wide character.

Related Topics

See the descriptions of the following functions: ifx_gl_ismblank(), ifx_gl_iswspace(), and ifx_gl_lc_errno().

For a description of character classification, see "Character Classification".

ifx_gl_iswcntrl()

The ifx_gl_iswcntrl() function determines whether a wide character contains a control character.

Syntax

Usage

The ifx_gl_iswcntrl() function tests whether wc is in the cntrl character class according to the rules of the current locale. The cntrl character class contains the single-byte control characters: alert, backspace, tab, new line, vertical-tab, form-feed, carriage-return, NUL, SOH, STX, ETX, EOT, ENQ, ACK, SO, SI, DLE, DC1, DC2, DC3, DC4, NAK, SYN, ETB, CAN, EM, SUB, ESC, IS4, IS3, IS2, IS1, and DEL. These characters are the ASCII characters whose code points are in the range 0x000 to 0x1F. In addition, the cntrl class contains any other control characters that the locale might define.

No characters in the upper, lower, alpha, digit, xdigit, punct, graph, or print classes are in the cntrl class.

Locale Information

The LC_CTYPE category of the current locale affects the behavior of this function because it defines the cntrl character class.

Return Values

>0

The wc character is in the cntrl character class.

0

The function was not successful, and the error number is set to indicate the cause. See the Errors section.

Errors

This function does not return a unique value to indicate an error. If an error occurred, the function returns zero (0) and sets the ifx_gl_lc_errno() error number to the following value..
IFX_GL_EILSEQ

The *wc value is not a valid wide character.

Related Topics

See the descriptions of the following functions: ifx_gl_ismcntrl() and ifx_gl_lc_errno().

For a description of character classification, see "Character Classification".

ifx_gl_iswdigit()

The ifx_gl_iswdigit() function determines whether a wide character contains a decimal digit.

Syntax

Usage

The ifx_gl_iswdigit() function tests whether wc is in the digit character class according to the rules of the current locale. The digit character class contains only the 10 ASCII digit characters (ASCII 0x030 to 0x039). Any multibyte versions or alternative representations of these digits that the locale might define (for example, Hindi or Kanji digits) are not in this class. Instead, they are in the alpha class.

Characters in this class are also in the xdigit, graph, and print classes. No characters in the upper, lower, alpha, blank, space, punct, or cntrl classes are in this class.

To determine whether a wide character contains a hexadecimal digit, you can use the ifx_gl_iswxdigit() function. Use the ifx_gl_iswalnum() function to test whether a wide character is an alphabetic character or a digit.

Locale Information

The LC_CTYPE category of the current locale affects the behavior of this function because it defines the digit character class.

Return Values

>0

The wc character is in the digit character class.

0

The function was not successful, and the error number is set to indicate the cause. See the Errors section.

Errors

This function does not return a unique value to indicate an error. If an error occurred, the function returns zero (0) and sets the ifx_gl_lc_errno() error number to the following value.
IFX_GL_EILSEQ

The *wc value is not a valid wide character.

Related Topics

See the descriptions of the following functions: ifx_gl_ismdigit(), ifx_gl_iswalnum(), ifx_gl_iswalpha(), ifx_gl_iswgraph(), ifx_gl_iswprint(), ifx_gl_iswxdigit(), and ifx_gl_lc_errno().

For a description of character classification, see "Character Classification".

ifx_gl_iswgraph()

The ifx_gl_iswgraph() function determines whether a wide character contains a graphical (visible) character.

Syntax

Usage

The ifx_gl_iswgraph() function tests whether wc is in the graph character class according to the rules of the current locale. The graph character class contains all characters that have a visual representation, including characters from the alpha, digit, punct, and xdigit classes. In addition, all round-trip code-set-conversion placeholder characters are in this class.

Characters in the graph class are also in the print class. No characters in the blank, space, or cntrl classes are in the graph class.

Locale Information

The LC_CTYPE category of the current locale affects the behavior of this function because it defines the graph character class.

Return Values

>0

The wc character is in the digit character class.

0

The function was not successful, and the error number is set to indicate the cause. See the Errors section.

Errors

This function does not return a unique value to indicate an error. If an error occurred, the function returns zero (0) and sets the ifx_gl_lc_errno() error number to the following value.
IFX_GL_EILSEQ

The *wc value is not a valid wide character.

Related Topics

See the descriptions of the following functions: ifx_gl_ismgraph(), ifx_gl_iswalnum(), ifx_gl_iswalpha(), ifx_gl_iswdigit(), ifx_gl_iswlower(), ifx_gl_iswprint(), ifx_gl_iswpunct(), ifx_gl_iswupper(), ifx_gl_iswxdigit(), and ifx_gl_lc_errno().

For a description of character classification, see "Character Classification".

ifx_gl_iswlower()

The ifx_gl_iswlower() function determines whether a wide character contains a lowercase alphabetic character.

Syntax

Usage

The ifx_gl_iswlower() function tests whether mb is in the lower character class according to the rules of the current locale. The lower character class contains:

Characters in this class are also in the alpha, graph, and print classes. No characters in the upper, digit, blank, space, punct, or cntrl classes are in this class.

To obtain the uppercase equivalent of an alphabetic wide character, you can use the ifx_gl_towupper() function. Use the ifx_gl_iswalpha() function to test whether a wide character is an alphabetic character (uppercase or lowercase).

Locale Information

The LC_CTYPE category of the current locale affects the behavior of this function because it defines the lower character class.

Return Values

>0

The wc character is in the digit character class.

0

The function was not successful, and the error number is set to indicate the cause. See the Errors section.

Errors

This function does not return a unique value to indicate an error. If an error occurred, the function returns zero (0) and sets the ifx_gl_lc_errno() error number to the following value.
IFX_GL_EILSEQ

The *wc value is not a valid wide character.

Related Topics

See the descriptions of the following functions: ifx_gl_ismlower(), ifx_gl_iswalnum(), ifx_gl_iswalpha(), ifx_gl_iswgraph(), ifx_gl_iswprint(), ifx_gl_iswupper(), ifx_gl_lc_errno(), and ifx_gl_towupper().

For a description of character classification, see "Character Classification".

ifx_gl_iswprint()

The ifx_gl_iswprint() function determines whether a wide character contains a printable character.

Syntax

Usage

The ifx_gl_iswprint() function tests whether wc is in the print character class according to the rules of the current locale. The print character class contains all characters that have a visual representation or are in the space class but not in the cntrl class.

All characters from the alpha, digit, punct, xdigit, and graph classes are also in this class. No characters in the cntrl class are in this class.

Locale Information

The LC_CTYPE category of the current locale affects the behavior of this function because it defines the print character class.

Return Values

>0

The wc character is in the digit character class.

0

The function was not successful, and the error number is set to indicate the cause. See the Errors section.

Errors

This function does not return a unique value to indicate an error. If an error occurred, the function returns zero (0) and sets the ifx_gl_lc_errno() error number to the following value.
IFX_GL_EILSEQ

The *wc value is not a valid wide character.

Related Topics

See the descriptions of the following functions: ifx_gl_ismprint(), ifx_gl_iswalnum(), ifx_gl_iswalpha(), ifx_gl_iswdigit(), ifx_gl_iswgraph(), ifx_gl_iswlower(), ifx_gl_iswpunct(), ifx_gl_iswupper(), ifx_gl_iswxdigit(), and ifx_gl_lc_errno().

For a description of character classification, see "Character Classification".

ifx_gl_iswpunct()

The ifx_gl_iswpunct() function determines whether a wide character contains a punctuation character.

Syntax

Usage

The ifx_gl_iswpunct() function tests whether wc is in the punct character class according to the rules of the current locale. The punct character class contains the following characters:

Graphic characters that are not really punctuation characters have traditionally been put in the punct class; instead they are in the graph class. Characters in this class are also in the graph and print classes. No characters in the upper, lower, alpha, digit, xdigit, blank, space, or cntrl classes are in this class.

Locale Information

The LC_CTYPE category of the current locale affects the behavior of this function because it defines the punct character class.

Return Values

>0

The wc character is in the digit character class.

0

The function was not successful, and the error number is set to indicate the cause. See the Errors section.

Errors

This function does not return a unique value to indicate an error. If an error occurred, the function returns zero (0) and sets the ifx_gl_lc_errno() error number to the following value.
IFX_GL_EILSEQ

The *wc value is not a valid wide character.

Related Topics

See the descriptions of the following functions: ifx_gl_ismpunct(), ifx_gl_iswgraph(), ifx_gl_iswprint(), and ifx_gl_lc_errno().

For a description of character classification, see "Character Classification".

ifx_gl_iswspace()

The ifx_gl_iswspace() function determines whether a wide character contains a space (vertical or horizontal) character.

Syntax

Usage

The ifx_gl_iswspace() function tests whether wc is in the space character class according to the rules of the current locale. The space character class contains:

No characters in the alpha, digit, xdigit, punct, or graph classes are in this class.

Locale Information

The LC_CTYPE category of the current locale affects the behavior of this function because it defines the space character class.

Return Values

>0

The wc character is in the digit character class.

0

The function was not successful, and the error number is set to indicate the cause. See the Errors section.

Errors

This function does not return a unique value to indicate an error. If an error occurred, the function returns zero (0) and sets the ifx_gl_lc_errno() error number to the following value.
IFX_GL_EILSEQ

The *wc value is not a valid wide character.

Related Topics

See the descriptions of the following functions: ifx_gl_ismspace(), ifx_gl_iswblank(), and ifx_gl_lc_errno().

For a description of character classification, see "Character Classification".

ifx_gl_iswupper()

The ifx_gl_iswupper() function determines whether a wide character contains an uppercase alphabetic character.

Syntax

Usage

The ifx_gl_iswupper() function tests whether wc is in the upper character class according to the rules of the current locale. The upper character class contains:

Characters in this class are also in the alpha, graph, and print classes. No characters in the lower, digit, blank, space, punct, or cntrl classes are in this class.

To determine the lowercase equivalent of an alphabetic wide character, you can use the ifx_gl_tomlower() function. Use the ifx_gl_ismalpha() function to test whether a wide character is an alphabetic character (uppercase or lowercase).

Locale Information

The LC_CTYPE category of the current locale affects the behavior of this function because it defines the upper character class.

Return Values

>0

The wc character is in the digit character class.

0

The function was not successful, and the error number is set to indicate the cause. See the Errors section.

Errors

This function does not return a unique value to indicate an error. If an error occurred, the function returns zero (0) and sets the ifx_gl_lc_errno() error number to the following value.
IFX_GL_EILSEQ

The *wc value is not a valid wide character.

Related Topics

See the descriptions of the following functions: ifx_gl_ismupper(), ifx_gl_iswalnum(), ifx_gl_iswalpha(), ifx_gl_iswgraph(), ifx_gl_iswlower(), ifx_gl_iswprint(), ifx_gl_lc_errno(), and ifx_gl_towupper().

For a description of character classification, see "Character Classification".

ifx_gl_iswxdigit()

The ifx_gl_iswxdigit() function determines whether a wide character contains a hexadecimal digit.

Syntax

Usage

The ifx_gl_iswxdigit() function tests whether wc is in the xdigit character class according to the rules of the current locale. The xdigit character class contains:

Any multibyte versions or alternative representations of these hexadecimal digits that the locale might define (for example, Hindi or Kanji digits) are not in this class. Instead, they are in the alpha class.

Characters in this class are also in the graph and print classes. No characters in the blank, space, punct, or cntrl classes are in this class.

To determine whether a wide character contains a decimal digit, you can use the ifx_gl_iswdigit() function. Use the ifx_gl_iswalnum() function to test whether a wide character contains an alphabetic character or a digit.

Locale Information

The LC_CTYPE category of the current locale affects the behavior of this function because it defines the xdigit character class.

Return Values

>0

The wc character is in the digit character class.

0

The function was not successful, and the error number is set to indicate the cause. See the Errors section.

Errors

This function does not return a unique value to indicate an error. If an error occurred, the function returns zero (0) and sets the ifx_gl_lc_errno() error number to the following value.
IFX_GL_EILSEQ

The *wc value is not a valid wide character.

Related Topics

See the descriptions of the following functions: ifx_gl_ismxdigit(), ifx_gl_iswalnum(), ifx_gl_iswalpha(), ifx_gl_iswdigit(), ifx_gl_iswgraph(), ifx_gl_iswprint(), and ifx_gl_lc_errno().

For a description of character classification, see "Character Classification".

ifx_gl_lc_errno()

The ifx_gl_lc_errno() function returns the value of the error number that some other INFORMIX-GLS function has set.

Syntax

Usage

The INFORMIX-GLS functions set the error number, of type int, to indicate additional information about an error that occurred. INFORMIX-GLS functions set this value only when an error occurs (unless documented otherwise). Because any INFORMIX-GLS function can set the error number, you must use ifx_gl_lc_errno() to inspect the error number immediately after you call the function in which the error occurred.

Tip: The values that ifx_gl_lc_errno() returns after a particular function are documented in the Errors section of that function description.
Certain code-set conversion functions are not dependent on a locale and do not set an error number that you can retrieve with ifx_gl_lc_errno(). Instead, these functions return a negative error code.

Return Values

integer error number

The error number that an INFORMIX-GLS function has set.

These error numbers are defined in the gls.h file and are described in the Errors section of the function descriptions.

-1

The function was not successful. The current processing locale has not been correctly initialized.

Errors

None

Related Topics

"Handling INFORMIX-GLS Exceptions"

ifx_gl_mb_loc_max()

The ifx_gl_mb_loc_max() function returns the maximum number of bytes in the characters of the current locale.

Syntax

Usage

The ifx_gl_mb_loc_max() function is useful when you need to allocate memory for a multibyte-character string. It returns the maximum number of bytes that any multibyte character can occupy. A multibyte code set can have characters of one, two, three, or four bytes.

Return Values

>=0

The maximum number of bytes in the current locale.

-1

The function was not successful.

Errors

None

Related Topics

"Managing Memory for Strings and Characters"

ifx_gl_mblen()

The ifx_gl_mblen() function returns number of bytes in a multibyte character.

Syntax

Usage

The ifx_gl_mblen() function determines the number of bytes in the multibyte character, mb. This function is often used to advance a pointer through a null-terminated multibyte string. However, it is slightly faster to advance a pointer through a null-terminated string with ifx_gl_mbsnext(), as the following code shows:

Return Values

>=0

The number of bytes in the mb multibyte character.

-1

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 -1 and sets the ifx_gl_lc_errno() error number to one of the following values.
IFX_GL_EILSEQ

The *mb value is not a valid multibyte character.

IFX_GL_EINVAL

The function cannot determine whether mb is a valid multibyte character because it would need to read more than mb_byte_limit bytes from mb. If mb_byte_limit is less than or equal to zero, this function always returns this error. For more information about this error, see "Keeping Multibyte Strings Consistent".

Related Topics

See the descriptions of the following functions: ifx_gl_lc_errno(), ifx_gl_mbsnext(), and ifx_gl_mbsprev().

For more information, see "String Traversal".

ifx_gl_mbscat()

The ifx_gl_mbscat() function concatenates two multibyte-character strings.

Syntax

Usage

The ifx_gl_mbscat() function appends a copy of the mbs2 multibyte-character string to the end of the mbs1 multibyte-character string. If mbs1 and mbs2 overlap, the results of this function are undefined.

If mbs1_byte_length is equal to IFX_GL_NULL, the function null-terminates the concatenated string. Any other value of mbs1_byte_length means that the function does not null-terminate the resulting concatenated string.

Return Values

>=0

The number of characters in the concatenated string, not including any null terminator.

-1

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 -1 and sets the ifx_gl_lc_errno() error number to one of the following values.
IFX_GL_PARAMERR

Either mbs1_byte_length is not equal to IFX_GL_NULL and is not greater than or equal to zero, or mbs2_byte_length is not equal to IFX_GL_NULL and is not greater than or equal to zero.

IFX_GL_TERMMISMAT

Either mbs1_byte_length is equal to IFX_GL_NULL, and mbs2_byte_length is greater than or equal to zero; or mbs1_byte_length is greater than or equal to zero, and mbs2_byte_length is equal to IFX_GL_NULL.

IFX_GL_EILSEQ

Either mbs1 or mbs2 contains an invalid multibyte character.

IFX_GL_EINVAL

Either the function cannot determine whether the last character of mbs1 is a valid multibyte character because it would need to read more than mbs1_byte_length bytes from mbs1, or the function cannot determine whether the last character of mbs2 is a valid multibyte character because it would need to read more than mbs2_byte_length bytes from mbs2. For more information about this error, see "Keeping Multibyte Strings Consistent".

Related Topics

See the descriptions of the following functions: ifx_gl_lc_errno(), ifx_gl_mbsncat(), ifx_gl_wcscat(), and ifx_gl_wcsncat().

For more information, see "Concatenation".

ifx_gl_mbschr()

The ifx_gl_mbschr() function searches for the first occurrence of a character in a multibyte-character string.

Syntax

Usage

The ifx_gl_mbschr() function locates the first occurrence of mb in the multibyte string mbs.

Return Values

gl_mchar_t *

A pointer to the first occurrence of mb in mbs.

NULL

Either mb was not found in mbs (the ifx_gl_lc_errno() error number is set to zero); 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 one of the following values.
IFX_GL_EILSEQ

The *mb value is an invalid multibyte character, or *mbs contains an invalid multibyte character.

IFX_GL_EINVAL

The function cannot determine whether mb is a valid multibyte character because it would need to read more than mb_byte_limit bytes from mb, or the function cannot determine whether the last character of mbs is a valid multibyte character because it would need to read more than mbs_byte_length bytes from mbs. If mb_byte_limit is less than or equal to zero, this function always returns this error. For more information about this error, see "Keeping Multibyte Strings Consistent".

IFX_GL_PARAMERR

The mbs_byte_length is not equal to IFX_GL_NULL and is not greater than or equal to zero.

Related Topics

See the descriptions of the following functions: ifx_gl_lc_errno(), ifx_gl_mbsrchr(), ifx_gl_wcschr(), and ifx_gl_wcsrchr().

For more information, see "Character Searching".

ifx_gl_mbscoll()

The ifx_gl_mbscoll() function uses localized collation order to compare two multibyte-character strings.

Syntax

Usage

The ifx_gl_mbscoll() function uses localized collation order to compare the multibyte-character strings mbs1 and mbs2.

Locale Information

The LC_COLLATE category of the current locale affects the behavior of this function because it defines the localized collation order. For more information, see "Character/String Comparison and Sorting".

Return Values

<0

The mbs1 string is less than the mbs2 string (mbs1 < mbs2), or the function was not successful, and the error number is set to indicate the cause. See the Errors section.

=0

The mbs1 string is equal to the mbs2 string (mbs1 = mbs2).

>0

The mbs1 string is greater than the mbs2 string (mbs1 > mbs2).

Errors

This function does not return a unique value to indicate an error. If an error occurred, this function returns -1 and sets the ifx_gl_lc_errno() error number to one of the following values.
IFX_GL_PARAMERR

Either mbs1_byte_length is not equal to IFX_GL_NULL, and is not greater than or equal to zero; or mbs2_byte_length is not equal to IFX_GL_NULL and is not greater than or equal to zero.

IFX_GL_TERMMISMAT

Either mbs1_byte_length is equal to IFX_GL_NULL, and mbs2_byte_length is greater than or equal to zero; or mbs1_byte_length is greater than or equal to zero, and mbs2_byte_length is equal to IFX_GL_NULL.

IFX_GL_EILSEQ

Either mbs1 or mbs2 contains an invalid multibyte character.

IFX_GL_EINVAL

Either the function cannot determine whether the last character of mbs1 is a valid multibyte character because it would need to read more than mbs1_byte_length bytes from mbs1, or the function cannot determine whether the last character of mbs2 is a valid multibyte character because it would need to read more than mbs2_byte_length bytes from mbs2. For more information about this error, see "Keeping Multibyte Strings Consistent".

IFX_GL_ENOMEM

Not enough memory exists to complete the operation.

Related Topics

See the descriptions of the following functions: ifx_gl_lc_errno() and ifx_gl_wcscoll().

For more information, see "Character/String Comparison and Sorting".

ifx_gl_mbscpy()

The ifx_gl_mbscpy() function copies a multibyte-character string.

Syntax

Usage

The ifx_gl_mbscpy() function copies the multibyte string mbs2 to the location that mbs1 references. If mbs1 and mbs2 overlap, the results of this function are undefined.

If mbs2_byte_length is equal to IFX_GL_NULL, the function null-terminates the concatenated string. Any other value of mbs2_byte_length means that the function does not null-terminate the resulting concatenated string.

Return Values

>=0

The number of bytes in the copied string, not including any null terminator.

-1

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 -1 and sets the ifx_gl_lc_errno() error number to one of the following values.
IFX_GL_PARAMERR

The mbs2_byte_length is not equal to IFX_GL_NULL and is not greater than or equal to zero.

IFX_GL_EILSEQ

The *mbs2 value contains an invalid multibyte character.

IFX_GL_EINVAL

The function cannot determine whether the last character of mbs2 is a valid multibyte character because it would need to read more than mbs2_byte_length bytes from mbs2. For more information about this error, see "Keeping Multibyte Strings Consistent".

Related Topics

See the descriptions of the following functions: ifx_gl_lc_errno(), ifx_gl_mbsncpy(), ifx_gl_wcscpy(), and ifx_gl_wcsncpy().

For more information, see "String Copying".

ifx_gl_mbscspn()

The ifx_gl_mbscspn() function determines the length of a complementary multibyte substring for a multibyte-character string.

Syntax

Usage

The ifx_gl_mbscspn() function returns the size of the initial substring of mbs1 that does not contain any characters that match characters in mbs2. The initial substring begins at the first character of mbs1. Therefore, this size is the number of characters in mbs1 before the first character that the mbs1 and mbs2 strings have in common. The string of uunmatched characters is called the complementary string.

For example, suppose you have the following two multibyte-characters strings, mbs1 and mbs2:

With these multibyte strings, the following call to the ifx_gl_mbscspn() function returns 3:

The first three characters of mbs1 are not in mbs2. The fourth character in mbs1 is D1D2D3, which is in mbs2 also.

Return Values

>=0

The number of characters in the initial substring of mbs1 that consists entirely of multibyte characters not in the string mbs2.

-1

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 -1 and sets the ifx_gl_lc_errno() error number to one of the following values.
IFX_GL_PARAMERR

Either mbs1_byte_length is not equal to IFX_GL_NULL, and is not greater than or equal to zero; or mbs2_byte_length is not equal to IFX_GL_NULL, and is not greater than or equal to zero.

IFX_GL_TERMMISMAT

Either mbs1_byte_length is equal to IFX_GL_NULL, and mbs2_byte_length is greater than or equal to zero; or mbs1_byte_length is greater than or equal to zero, and mbs2_byte_length is equal to IFX_GL_NULL.

IFX_GL_EILSEQ

Either mbs1 or mbs2 contains an invalid multibyte character.

IFX_GL_EINVAL

Either the function cannot determine whether the last character of mbs1 is a valid multibyte character because it would need to read more than mbs1_byte_length bytes from mbs1, or the function cannot determine whether the last character of mbs2 is a valid multibyte character because it would need to read more than mbs2_byte_length bytes from mbs2. For more information about this error, see "Keeping Multibyte Strings Consistent".

Related Topics

See the descriptions of the following functions: ifx_gl_lc_errno(), ifx_gl_mbsspn(), ifx_gl_wcsspn(), and ifx_gl_wcscspn().

For more information, see "String-Length Determination".

ifx_gl_mbslen()

The ifx_gl_mbslen() function determines the number of characters in a multibyte-character string.

Syntax

Usage

The ifx_gl_mbslen() function returns the number of characters (not bytes) in the string mbs, not including any terminating null character. The length that ifx_gl_mbslen() returns includes any trailing white space. The trailing-space characters are all characters that the blank character class of the current locale defines. Use the ifx_gl_mbntslen() function if you want the length without trailing white space.

For example, the following call to ifx_gl_mbslen() return a value of 12 (where A1A2, B1B2B3, and E1 are multibyte characters of 2, 3, and 1 bytes, respectively, and each s represents a single-byte horizontal white-space character):

Use the ifx_gl_mbsntslen() or ifx_gl_mbsntsbytes() function if you want the length without trailing white space.

Return Values

>=0

The number of characters in the mbs string, not including any null terminator but including any trailing white space.

-1

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 -1 and sets the ifx_gl_lc_errno() error number to one of the following values.
IFX_GL_PARAMERR

The mbs_byte_length is not equal to IFX_GL_NULL and is not greater than or equal to zero.

IFX_GL_EILSEQ

The *mbs value contains an invalid multibyte character.

IFX_GL_EINVAL

The function cannot determine whether the last character of mbs is a valid multibyte character because it would need to read more than mbs_byte_length bytes from mbs. For more information about this error, see "Keeping Multibyte Strings Consistent".

Related Topics

See the descriptions of the following functions: ifx_gl_lc_errno(), ifx_gl_mblen(), ifx_gl_mbsnext(), ifx_gl_mbsntsbytes(), ifx_gl_mbsntslen(), and ifx_gl_wcslen().

For more information, see "String-Length Determination".




INFORMIX-GLS Programmer's Guide, version 9.1
Copyright © 1998, Informix Software, Inc. All rights reserved.