uName2Username

From Second Life Wiki
Revision as of 14:30, 22 January 2015 by ObviousAltIsObvious Resident (talk | contribs) (<lsl> tag to <source>)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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.