informix
Informix DataBlade API Programmer's Manual
DataBlade API Function Descriptions

mi_string_to_lvarchar()

The mi_string_to_lvarchar() function converts a null-terminated string to a varying-length structure.

Syntax

Usage

The mi_string_to_lvarchar() function stores the null-terminated string that str references into the data portion of a new varying-length structure. It does not copy the null terminator. This function is a constructor function for a varying-length structure. The function allocates memory for the varying-length structure that it returns. Therefore, you must use the mi_var_free() function to free this structure when it is no longer needed.

The mi_string_to_lvarchar() function allocates a new varying-length structure with the current memory duration.

Return Values

mi_lvarchar * is a pointer to the allocated varying-length structure.
NULL indicates that the function was not successful.

Related Topics

See the descriptions of the following functions: mi_lvarchar_to_string(), mi_new_var(), mi_var_copy(), mi_var_free(), and mi_var_to_buffer().

For more information, see Varying-Length Data Structures.


Informix DataBlade API Programmer's Manual, Version 9.2
Copyright © 1999, Informix Software, Inc. All rights reserved