Monday, July 13, 2009

Removing last char

PHP:
$string = "asdf"
$string = substr_replace($string ,"",-1);

JS:
str = "asdf";
str = str.slice(0,-1);

No comments:

Post a Comment