int strlen ( string str ) returns the number of characters in it:
<? print strlen("Foo") . "\n"; // 3 print strlen("Goodbye, Perl!") . "\n"; // 14 ?>