CoreyJAvitar
05-23-2008, 10:19 PM
Hey all!
I've wondered how to do this multiple times, and I usually forget after I figure it out, but I'll post here in case anybody else is wondering.
I wanted to remove the end character from a string (in this case a carrage return).
There's no explicit command to do this, so you gotta kinda hack job it:
$mystring = "IamAwesome";
int $num;
$num = `size($mystring)`;
$num -=1;
$newstring = `substring $mystring 1 $num`;
There you go!
I hope someone finds this info useful.
I've wondered how to do this multiple times, and I usually forget after I figure it out, but I'll post here in case anybody else is wondering.
I wanted to remove the end character from a string (in this case a carrage return).
There's no explicit command to do this, so you gotta kinda hack job it:
$mystring = "IamAwesome";
int $num;
$num = `size($mystring)`;
$num -=1;
$newstring = `substring $mystring 1 $num`;
There you go!
I hope someone finds this info useful.
