OsFormatString

From OpenSimulator

Revision as of 10:57, 30 July 2011 by Fritigern (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
string osFormatString(string format,list params)
Return the string with parameters substituted into it. These parameters need to be incrementing numbers, starting at zero, and surrounded by single accolades (also known as curly brackets).
Threat Level Low
Permissions No permissions specified
Extra Delay No function delay specified
Example(s)
//
//osFormatString() example, by Tom Earth.
//
default
{
    state_entry()
    {
        string to_format = "My name is {0}. My owner is {1}. I am in the sim {2}";
        list format = [llGetObjectName(),llKey2Name(llGetOwner()),llGetRegionName()];
        llOwnerSay(osFormatString(to_format, format)); 
    }
}
Personal tools
General
About This Wiki