Can someone tell me how to get an avatars first and last names, separately. I can see how to get the full name, but not first and last separate.
Thanks
These forums are CLOSED. Please visit the new forums HERE
Avatar First and LAst Names |
|
|
Kurth Milos
Registered User
Join date: 10 Oct 2007
Posts: 17
|
09-03-2008 08:58
Can someone tell me how to get an avatars first and last names, separately. I can see how to get the full name, but not first and last separate.
Thanks |
|
Dora Gustafson
Registered User
Join date: 13 Mar 2007
Posts: 779
|
09-03-2008 09:58
Try this:
string s = "Full Name"; string FirstName = llGetSubString( s, 0, llSubStringIndex( s, " " -1);string LastName = llGetSubString( s, llSubStringIndex( s, " " +1, -1);See: http://lslwiki.net/lslwiki/wakka.php?wakka=string _____________________
From Studio Dora
|
|
Talon Brown
Slacker Punk
Join date: 17 May 2006
Posts: 352
|
09-03-2008 10:50
Alternatively:
string s = "John Doe"; list name = llParseString2List(s, [" "], []); string firstName = llList2String(name, 0); string lastName = llList2String(name, 1); Previously, this was faster than using the string functions but I do not know if that has changed since the Mono rollout. |
|
Kurth Milos
Registered User
Join date: 10 Oct 2007
Posts: 17
|
09-04-2008 09:38
Thanks!!!!!!!!!!
|