PHP Code:
public function removeAllSpaces(text) {
temp.toks = text.tokenize();
for (temp.str : temp.toks) {
if (temp.str == " ") {
continue;
}
temp.out @= temp.str;
}
return temp.out.trim();
}
//#CLIENTSIDE
public function removeAllSpaces(text) {
temp.toks = text.tokenize();
for (temp.str : temp.toks) {
if (temp.str == " ") {
continue;
}
temp.out @= temp.str;
}
return temp.out.trim();
}
This removes all spaces everywhere on a join. A simple usage of this would be something like.
PHP Code:
function onCreated() {
join("util_spaces");
temp.string = " Lollin @ Chompy";
echo(removeAllSpaces(temp.string));
}
^ That would echo: "Lollin@Chompy";
Just for some of those minor irritations that are too minor to add a built in function for.