Difference between revisions of "UName2Username"
Jump to navigation
Jump to search
Void Singer (talk | contribs) m (tweaked) |
m (<lsl> tag to <source>) |
||
(3 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
{{LSL Header|[[:Category:LSL_User-Defined_Functions|User-Defined Functions]]|[[User:Void_Singer|Void's User Page]]}} <!-- please do not remove added links --> | {{LSL Header|[[:Category:LSL_User-Defined_Functions|User-Defined Functions]]|[[User:Void_Singer|Void's User Page]]}} <!-- please do not remove added links --> | ||
<div style="float:right;">__TOC__</div> | <div style="float:right;">__TOC__</div> | ||
{{DISPLAYTITLE:uName2Username | {{DISPLAYTITLE:uName2Username}} | ||
{{void-box | {{void-box | ||
|title=<div id="box" style="display:none"><h2>Summary</h2></div>[[:Category:LSL_User-Defined_Functions|User-Defined Function]]: [[string]] uName2Username( [[string]] ''vStrNom'' ); | |title=<div id="box" style="display:none"><h2>Summary</h2></div>[[:Category:LSL_User-Defined_Functions|User-Defined Function]]: [[string]] uName2Username( [[string]] ''vStrNom'' ); | ||
Line 12: | Line 12: | ||
* LSO: 116 bytes | * LSO: 116 bytes | ||
* MONO: 512 bytes | * MONO: 512 bytes | ||
< | <source lang="lsl2">string uName2Username( string vStrNom ){ | ||
return llDumpList2String( llParseString2List( llToLower( vStrNom ), [" resident", " "], [] ), "." ); | return llDumpList2String( llParseString2List( llToLower( vStrNom ), [" resident", " "], [] ), "." ); | ||
} | } | ||
Line 19: | Line 19: | ||
/*// 2011 (CC0) [ http://creativecommons.org/publicdomain/zero/1.0 ] //*/ | /*// 2011 (CC0) [ http://creativecommons.org/publicdomain/zero/1.0 ] //*/ | ||
/*// Void Singer [ https://wiki.secondlife.com/wiki/User:Void_Singer ] //*/ | /*// Void Singer [ https://wiki.secondlife.com/wiki/User:Void_Singer ] //*/ | ||
/*//-- --//*/</ | /*//-- --//*/</source><!-- Please do not remove license statement --> | ||
}} | }} | ||
Line 42: | Line 42: | ||
* [[llGetUsername]] | * [[llGetUsername]] | ||
}} | }} | ||
[[Category:LSL_User-Defined_Functions| | [[Category:LSL_User-Defined_Functions|Name2Username|uName2Username]] |
Latest revision as of 14:30, 22 January 2015
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials | User-Defined Functions | Void's User Page |
User-Defined Function: string uName2Username( string vStrNom );
Returns a string that is vStrNom converted to a Username.
- vStrNom: source name string
Code:
- LSO: 116 bytes
- MONO: 512 bytes
string uName2Username( string vStrNom ){
return llDumpList2String( llParseString2List( llToLower( vStrNom ), [" resident", " "], [] ), "." );
}
/*//-- Anti-License Text --//*/
/*// Contributed Freely to the Public Domain without limitation. //*/
/*// 2011 (CC0) [ http://creativecommons.org/publicdomain/zero/1.0 ] //*/
/*// Void Singer [ https://wiki.secondlife.com/wiki/User:Void_Singer ] //*/
/*//-- --//*/
Caveats
- This function does not check input name validity
Notes
- Useful for formatting legacy name sources (like notecard access lists) for condensed storage.