OsStringReplace

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
 
Line 17: Line 17:
 
         string src = "abcdefdedhdekef";
 
         string src = "abcdefdedhdekef";
 
         string val = "de";
 
         string val = "de";
         strinf nval = "";
+
         string nval = "";
 
         llOwnerSay((string)osStringReplace(src, val, nval));
 
         llOwnerSay((string)osStringReplace(src, val, nval));
 
     }
 
     }

Latest revision as of 17:02, 1 May 2019

string osStringReplace(string src, string oldvalue, string newvalue)
Returns a string in which all occurrences of the string oldvalue in string src are replaced by string newvalue
Threat Level No threat level specified
Permissions Use of this function is always allowed by default
Delay No function delay specified
Example(s)
// Example of osStringRemove
 
default
{
    state_entry()
    {
        llSay(PUBLIC_CHANNEL, "Touch me to show osStringReplace");
    }
 
    touch_start(integer n)
    {
        string src = "abcdefdedhdekef";
        string val = "de";
        string nval = "";
        llOwnerSay((string)osStringReplace(src, val, nval));
    }
}


Personal tools
General
About This Wiki