Difference between revisions of "User talk:Domitan Redenblack"
(llGetSubString is predictable) |
|||
(3 intermediate revisions by 2 users not shown) | |||
Line 6: | Line 6: | ||
<lsl>llGetSubString("abcdefg", 2, 4) == "cde" | <lsl>llGetSubString("abcdefg", 2, 4) == "cde" | ||
llGetSubString("abcdefg", 4, 2) == "abcefg" | llGetSubString("abcdefg", 4, 2) == "abcefg" | ||
llGetSubString("abcdefg", -5, -3) == "cde" | llGetSubString("abcdefg", -5, -3) == "cde" | ||
llGetSubString("abcdefg", -3, -5) == "abcefg | llGetSubString("abcdefg", -3, -5) == "abcefg"</lsl> | ||
Suffice it to say, it is not a bug. However, changing the behavior at this point would break 7 years of existing content. | Suffice it to say, it is not a bug. However, changing the behavior at this point would break 7 years of existing content. | ||
-- '''[[User:Strife_Onizuka|Strife]]''' <sup><small>([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])</small></sup> 00:32, 5 September 2011 (PDT) | -- '''[[User:Strife_Onizuka|Strife]]''' <sup><small>([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])</small></sup> 00:32, 5 September 2011 (PDT) | ||
== llGetSubString IS, IS, IS unpredictable == | |||
Sorry Strife, but (.., -3, -5) returns the entire string for me... sometimes returns a weird part. Hard to predict. I was using this on a "(string)objectKey" and I tried 10 different ways. If "start > end" I get unpredictable results. |
Latest revision as of 01:17, 5 September 2011
llGetSubString is predictable
I take it you had some trouble with the Ranges & Indexes section, it is a bit complicated and the functionality it describes is strange. However it is predictable.
Quick crash course: <lsl>llGetSubString("abcdefg", 2, 4) == "cde" llGetSubString("abcdefg", 4, 2) == "abcefg" llGetSubString("abcdefg", -5, -3) == "cde" llGetSubString("abcdefg", -3, -5) == "abcefg"</lsl>
Suffice it to say, it is not a bug. However, changing the behavior at this point would break 7 years of existing content. -- Strife (talk|contribs) 00:32, 5 September 2011 (PDT)
llGetSubString IS, IS, IS unpredictable
Sorry Strife, but (.., -3, -5) returns the entire string for me... sometimes returns a weird part. Hard to predict. I was using this on a "(string)objectKey" and I tried 10 different ways. If "start > end" I get unpredictable results.