Regular API function

simGetStackStringValue

Description Tries to retrieve the value at the top of the stack, if that value is a string. See also the other stack functions.
C synopsis simChar* simGetStackStringValue(simInt stackHandle,simInt* stringSize)
C parameters
stackHandle: a stack handle obtained with simCreateStack.
stringSize: a pointer to a location receiving the size of the string. Can be NULL if the string size is of no interest.
C return value
In case of an error, the return value is NULL and stringSize will be set to -1 (if stringSize is not NULL).
If the stack item is not a string, the return value is NULL and stringSize will be set to 0 (if stringSize is not NULL).
If the stack item is a string, the return value is not NULL, and stringSize will be the size of the string buffer (if stringSize is not NULL). In that case, the user is in charge of releasing the returned buffer with simReleaseBuffer.
Lua synopsis -
Lua parameters
-
Lua return values
-

All regular API functions on one page