Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Problems with llStringTrim

Grandma Bates
Registered User
Join date: 9 Mar 2007
Posts: 5
03-30-2007 09:19
I just tried using llStringTrim in a script this morning. In situations where there was no white space to trim it produced a script error and stopped the script. (I used the STRING_TRIM option.) I ended up just using my old trim routine. Has anybody else tried to use this new function? Does it work for you?
Pale Spectre
Registered User
Join date: 2 Sep 2005
Posts: 586
03-30-2007 12:26
I was going to suggest you tried: llStringTrim(test + " ", STRING_TRIM), but I can't get it to work at all. :p
CODE
string test = " test ";

default
{
touch_start(integer total_number)
{
llOwnerSay("Testing");
test = llStringTrim(test, STRING_TRIM);
llOwnerSay(test);
}
}
Gives me:

Object: Testing
Object: Script run-time error
Object: Bounds Check Error

For the time being I'll think of it as the Bounds Check Error function. ;)
Deanna Trollop
BZ Enterprises
Join date: 30 Jan 2006
Posts: 671
03-30-2007 12:26
Wow I hadn't even heard about this function until now.And after testing it myself, it seems to crash with a Bounds Check Error no matter what... with or without spaces before and/or after the string, using STRING_TRIM, STRING_TRIM_HEAD, or STRING_TRIM_TAIL.

So I guess I won't be using that particular landmine of a function anytime soon. :rolleyes:
Meade Paravane
Hedgehog
Join date: 21 Nov 2006
Posts: 4,845
03-30-2007 12:42
From: Deanna Trollop
Wow I hadn't even heard about this function until now.

Neither had I.. A quick google doesn't show it on the old (non-LL) wiki sites.

This would be nice to have (if it worked).. Anybody file a bug yet?
Deanna Trollop
BZ Enterprises
Join date: 30 Jan 2006
Posts: 671
03-30-2007 12:51
From: Meade Paravane
Anybody file a bug yet?

Just fired one off. First tried submitting an issue through JIRA, but that interface looks intimidating. :eek:
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
03-30-2007 12:56
Despite being in the compiler I don't think it's been added to the sim yet, it's mentioned as being added in the 1.14.1 release notes. I'll mark it thus.
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river.
- Cyril Connolly

Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence.
- James Nachtwey
Deanna Trollop
BZ Enterprises
Join date: 30 Jan 2006
Posts: 671
03-30-2007 13:08
From: Strife Onizuka
Despite being in the compiler I don't think it's been added to the sim yet
If that ain't putting the cart before the equine... :cool:
Meade Paravane
Hedgehog
Join date: 21 Nov 2006
Posts: 4,845
03-30-2007 13:17
Or the code before the engine..
Grandma Bates
Registered User
Join date: 9 Mar 2007
Posts: 5
It is on the wiki
03-30-2007 14:15
I found it on the LSL wiki. It says that it is a new/added feature. I was happy to see it, but not so happy about the implementation.

It looks like I should have submitted this as a bug. Can someone give a quick pointer as to where/how to do so? Thank you in advance.
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
03-30-2007 20:46
If you find something wrong in LSL best to post it to the forums as chances are good, you aren't the first to find it (unless it's some horrible exploit then report it as an exploit).
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river.
- Cyril Connolly

Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence.
- James Nachtwey