Difference between revisions of "Category talk:LSL String"

From Second Life Wiki
Jump to navigation Jump to search
m
(llSubStringIndex missing in LSL String category)
Line 1: Line 1:
==llSubStringIndex is not mentioned==
The function llGetSubString(string src, integer start, integer end) is not mentioned at all on this page. It should be added to the list of build-in functions at the page end.
----
Value1 equals value2 is how I spelled value1 == value2, back over in the Category tab. Please fix the spelling, if you're enough more Wiki literate than I to know how.
Value1 equals value2 is how I spelled value1 == value2, back over in the Category tab. Please fix the spelling, if you're enough more Wiki literate than I to know how.



Revision as of 07:34, 10 August 2010

llSubStringIndex is not mentioned

The function llGetSubString(string src, integer start, integer end) is not mentioned at all on this page. It should be added to the list of build-in functions at the page end.


Value1 equals value2 is how I spelled value1 == value2, back over in the Category tab. Please fix the spelling, if you're enough more Wiki literate than I to know how.

The == operator needs an example.

Working with the dataserver event I discovered that "\n" within a string taken from a notecard is not read by for example llSetText() as a new line.

Assuming "data" was a string such as "Douglas Adams,High on a rocky promontory\nsat an Electric Monk on a bored horse." it is presented as "High on a rocky promontory\nsat an Electric Monk on a bored horse." by the llSetText <lsl> default {

   dataserver(key id, string data)
   {
       llSetText(llList2String(llCSV2List(data),1), <1.0,1.0,1.0>, 1.0);
   }

} </lsl>

Whereas

<lsl> default {

   state_entry()
   {
       llSetText("High on a rocky promontory\nsat an Electric Monk on a bored horse.", <1.0,1.0,1.0>, 1.0);
   }

} </lsl>

is presented as "High on a rocky promontory sat an Electric Monk on a bored horse." as one would expect. -- Eddy 01:48, 29 May 2009 (UTC)

Escaped character support is a feature of the compiler, not the VM. You want Unescape. -- Strife (talk|contribs) 12:12, 29 May 2009 (UTC)

What's the VM? -- Eddy 01:30, 30 May 2009 (UTC)

Mono or LSO. It's what runs and sandboxes your script. VM = Virtual Machine. -- Strife (talk|contribs) 03:13, 30 May 2009 (UTC)

Thanx Strife. 6 months ago "LSO" meant "London Symphony Orchestra" to me. And "mono" was what to expect from original pressings of Beach Boys and Beatles albums. -- Eddy 03:23, 30 May 2009 (UTC)