LlInsertString

De DigiWiki.

Version du 25 août 2012 à 18:44 par Djphil (discuter | contributions)
(diff) ← Version précédente | Voir la version courante (diff) | Version suivante → (diff)
llInsertString("input", 2, "put out")// returns "input output"

This function will allow you to use a negative number as the position:

string insertString(string destination, integer position, string str) {
    if (position < 0)
        if ((position += llStringLength(destination)) < 0)
            position = 0;
    return llInsertString(destination, position, str);
}
Outils personnels
donate
Google Ads