informix
INFORMIX-ESQL/C Programmer's Manual
Working with Character and String Data Types

Character and String Library Functions

The ESQL/C library contains the following character-manipulation functions. You can use these functions in your C programs to manipulate single characters and strings of bytes and characters, including variable-length expressions of the following data types:

The internal structure referenced by the lvarchar pointer data type is different than the character representation of a fixed-size lvarchar variable. You must use the ifx_var() functions to manipulate lvarchar pointer variables. For more information on the ifx_var() functions, see The lvarchar pointer and var binary Library Functions.

The functions whose names begin with by act on and return fixed-length strings of bytes. The functions whose names begin with rst and st (except stchar) operate on and return null-terminated strings. The rdownshift() and rupshift() functions also operate on null-terminated strings but do not return values. When you compile your ESQL/C program with the esql preprocessor, it calls on the linker to link these functions to your program. The following list provides brief descriptions of the character and string library functions and refers you to the pages where detailed information for each function is given.

Function
Name
Description Page
Reference
bycmpr() Compares two groups of contiguous bytes B-10
bycopy() Copies bytes from one area to another B-13
byfill() Fills an area you specify with a character B-15
byleng() Counts the number of bytes in a string B-17
ldchar() Copies a fixed-length string to a null-terminated string B-288
rdownshift() Converts all letters to lowercase B-298
rstod() Converts a string to a double value B-333
rstoi() Converts a string to a short integer value B-335
rstol() Converts a string to a 4-byte integer value B-337
rupshift() Converts all letters to uppercase B-347
stcat() Concatenates one string to another B-382
stchar() Copies a null-terminated string to a fixed-length string B-384
stcmpr() Compares two strings B-386
stcopy() Copies one string to another string B-388
stleng() Counts the number of bytes in a string B-390


INFORMIX-ESQL/C Programmer's Manual, Version 9.21
Copyright © 1999, Informix Software, Inc. All rights reserved