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/C++
synopsis
simChar* simGetStackStringValue(simInt stackHandle,simInt* stringSize)
C/C++
parameters
stackHandle: a stack handle obtained with simCreateStack.
stringSize: a pointer to a location receiving the size of the string. Can be nullptr if the string size is of no interest.
C/C++
return value
In case of an error, the return value is nullptr and stringSize will be set to -1 (if stringSize is not nullptr).
If the stack item is not a string, the return value is nullptr and stringSize will be set to 0 (if stringSize is not nullptr).
If the stack item is a string, the return value is not nullptr, and stringSize will be the size of the string buffer (if stringSize is not nullptr). In that case, the user is in charge of releasing the returned buffer with simReleaseBuffer.
Lua
synopsis
Lua
parameters
Lua
return values
Python
synopsis

<