Summary:
Set the data portion of an Eant_CharStrPtr to a given string.
Header File:
eant.h
Library Name:
elib
|
void eant_CharStrCreate (
|
Eant_CharStrPtr* charStr,
|
Eerr_ErrorReport** lclerr,
charStr
The character string to be created.
lclerr
Error handling structure pointer.
str
The initialization string.
Description:
If the input string is NULL, just free the data portion of the Eant_CharStrPtr. Otherwise, find the length of the input string (stripped of trailing blanks, newlines and carriage returns). Unless it happens to be of the correct size, free any space that the data portion of the Eant_CharStrPtr already points to. Allocate the space needed for a copy of the string, set the data pointer of the Eant_CharStrPtr to this space and copy the (shortened) string to this location. Set the count of the Eant_CharStrPtr to the length of the new string (including the NULL).
Notes:
None.
Return Description:
This function is of type void. If an error occurs this function calls eerr_CreateErrorReport.