regstring, regstringl
regstring, regstringl |
Purpose
Synopsis
const char *regstring(XPRMcontext ctx, const char *string);
const char *regstringl(XPRMcontext ctx, const char *string, size_t len);
Arguments
ctx
|
Mosel's execution context
|
string
|
Text string to register
|
len
|
Length of the string in bytes (not including the terminating null character)
|
Return value
Registered text string.
Further information
Mosel requires that each text string is registered. If a native function returns a newly generated string or uses a new string in a Mosel data structure (like a set), this string must be registered with this function before it is used. The returned value is a copy of the string argument (unless the provided parameter was already a registered string). Registered strings remain valid until the end of execution of the model (
i.e. they are never released or moved).
Related topics