note 46916 deleted from ref.strings by derick

From: Date: Wed, 09 Feb 2005 18:11:10 +0000
Subject: note 46916 deleted from ref.strings by derick
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-84741@lists.php.net to get a copy of this message
Note Submitter: [tab!] ---- // // string strtrevis(string str, [int maxlen = 64]) // // truncate a long string to a given maximum length by appending // a placeholder at the end // function strtrevis($str, $maxlen = 64) { if(strlen($str = chop($str)) > ($maxlen = max($maxlen, 6))) $str = substr($str, 0, $maxlen - 3) . "..."; return($str); }

« previous php.notes (#84741) next »