prg_string_const()
Abstract
Returns a permanently allocated string with the same content as the source string.
Syntax
prg_string_const (allocated_string)
| Argument | Type | Description |
|---|---|---|
allocated_string |
const char * |
String to be duplicated as a constant. |
Return Type
const char *
The requested constant string
Header
prg_string_funcs.h
Details
This function returns a constant string containing the text of allocated_string. If such a string already exists in the constant string table, a pointer to the existing memory is returned. Otherwise, a new constant string is allocated and put in the table. The returned string must never be modified or freed.