string trim (string $str [, string $charlist ])
trim() strips a white space (or other characters) from the beginning and end of a string
※ available F/W version : 1.3.1 ~
Returns the modified string, PHP error on error
<?php
hexdump(trim("\x0b\x00\x0d\x0a\x09\x20ABCDEFG\x0b\x00\x0d\x0a\x09\x20"));
// OUTPUT: 0000 41 42 43 44 45 46 47 |ABCDEFG |
echo trim(".0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ012345678.", "0123.45678"), "\r\n";
// OUTPUT: 9ABCDEFGHIJKLMNOPQRSTUVWXYZ
echo trim(".0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ012345678.", "0..3....4..8"), "\r\n";
// OUTPUT: 9ABCDEFGHIJKLMNOPQRSTUVWXYZ
?>
This function is identical to the PHP group's trim() function.