Regular API function

simGetNameSuffix

Description Returns the name suffix for an object name (e.g. "myRobot#42"'s name suffix is 42), or retrieves the name suffix set for the current script or for c/c++ API calls. See also simSetNameSuffix, and read the section on accessing general-type objects.
C synopsis simInt simGetNameSuffix(const simChar* nameWithSuffix)
C parameters
nameWithSuffix: full name (e.g. "myRobot#42"), or NULL to retrieve the name suffix for all c/c++ API calls
C return value
Name suffix of nameWithSuffix, or current name suffix for c/c++ API calls
Lua synopsis
(1) number nameSuffix,string name=simGetNameSuffix(string nameWithSuffix): retieves the name suffix of nameWithSuffix
(2) number nameSuffix=simGetNameSuffix(nil): retrieves the name suffix set for current script
Lua parameters
nameWithSuffix: full name (e.g. "myRobot#42")
Lua return values
nameSuffix: name suffix (e.g. 42) of nameWithSuffix, or name suffix that is set for current script
name: name without suffix (e.g. "myRobot") or nil if the simGetNameSuffix argument was nil

All regular API functions on one page