Jump to content
You are about to reply to a thread that has been inactive for 101 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Posted

Hello,

 I can't find any information in the wiki about Editi masks.
 Does this exist in LSL?

Example: I want to format a two-digit HOUR using the (string) function.
For now, I use this type of writing to edit an integer HOUR
        string HH = (string)HOUR;
        if (llStringLength(HH) == 1) HH = “0” + HH;

 It would still be simpler with an edit mask ...
 

Posted (edited)

another way to do this

string HH = llGetSubString("0" + (string)HOUR, -2, -1); // get the two rightmost chars

Edited by elleevelyn
  • Like 1
Posted (edited)

Bravo :) I admit that this is a very nice demonstration of the use of negative indexes in a string.

Edited by Mike Zahm
You are about to reply to a thread that has been inactive for 101 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...