// Text2Leet(string text) // by jadz0r Conover // Sept. 04, 2006 // Some might argue that a single strided list could replace the following two to make this better, but I hate them. list Text = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"]; list Leet = ["4", "|3", "(", "D", "3", "ph", "6", "|-|", "!", "J", "|<", "L", "|\\/|", "|\\|", "0", "P", "Q", "|2", "5", "7", "|_|", "\\/", "\\/\\/", "><", "'/", "Z"]; string Text2Leet(string text) { text = llToLower(text); // Since our "Text" list only contains lower case letters, we'll turn the 'text' parameter to the same capitalization. string LeetString; // This will be our end result and what this function will return. integer x; for (x = 0; x < llStringLength(text); x++) { // We run a loop as many times as many characters (including spaces) the 'text' parameter has. string CurChar = llGetSubString(text, x, x); // Define the current character we want to evaluate. if (llListFindList(Text, [CurChar]) != -1) { // If it's found in the "Text" list, do the following: LeetString = LeetString + llList2String(Leet, llListFindList(Text, [CurChar])); // Append the corresponding "Leet" character to our end result. } else { // If the current character we're evaluating is not in the "Text" list, LeetString = LeetString + CurChar; // simply append it to our end result. } } return LeetString; // Voila! }