String operations
-
is there a simple way to truncate a string ?
like strleft() or strright()I would like to format the player score on 5 caracters.
for example, if the player score is 250 points, I want to display "00250"
I concatenate "00000"+"250" and I keep the 5 caraters from then right :00000250but it seems ther is not yet any functions to do that...
Any ideas ?
-
truncScore = score[-5:]
Should return the last 5 digits of string “score” -
That's perfect @Jongjungbu
Thank you
the use of this feature deserves to be documented. -
I'll be working on adding this documentation to a future patch - it won't be in the one coming up, but the online help can and will be updated earlier.