Regular API function

simGetApiFunc / sim.getApiFunc

Description Retrieves all API functions and variables that match a specific word. Useful for script code auto-completion functionality. See also sim.getApiInfo.
C synopsis simChar* simGetApiFunc(simInt scriptHandleOrType,const simChar* apiWord)
C parameters
scriptHandleOrType: the handle of the script, otherwise the type of the script. Can be -1 in order to ignore the script type.
apiWord: the word that API functions and variables should match, e.g. "sim.getObj". Only matches up to the first dot are returned, if the apiWord does not contain any dot. To retrieve all functions and variables, leave apiWord empty. To retrieve only functions, add '+' as prefix. To retrieve only variables, add '-' as prefix.
C return value
nullptr in case of an error, or if there is no match. Otherwise all matching API functions and variables, space-separated. The user is in charge of releasing the returned buffer with simReleaseBuffer.
Lua synopsis table[] funcsAndVars=sim.getApiFunc(int scriptHandleOrType,string apiWord)
Lua parameters
Similar to the C-function counterpart
Lua return values
funcsAndVars: a table containing all matching API functions and variables.