Re: [PHP] high % of capital letters in a string

2002-06-06 Thread Justin French
Thanks Lars & Evan... much appreciated! Justin French on 07/06/02 2:13 PM, Lars Torben Wilson ([EMAIL PROTECTED]) wrote: > On Thu, 2002-06-06 at 20:20, Justin French wrote: >> Hi, >> >> How would I determine if there was a high % (say > 40%) of capital letters >> in a string? I'm trying to t

Re: [PHP] high % of capital letters in a string

2002-06-06 Thread Lars Torben Wilson
On Thu, 2002-06-06 at 20:20, Justin French wrote: > Hi, > > How would I determine if there was a high % (say > 40%) of capital letters > in a string? I'm trying to think of a way of preventing endless use of > capital letters in a message board, to stop YELLERS. > > Justin French >

Re: [PHP] high % of capital letters in a string

2002-06-06 Thread Evan Nemerson
/* Perhaps something like this? */ // UNTESTED $string = "ThE sTrInG tO tEsT"; function str2arr($str) { for ( $x = 0 ; $x < ( strlen($str) ) ; $x++ ) { $arr[$x] = substr($str, $x, 1); } return $arr; } foreach ( (str2arr($string)) as $char ) {

[PHP] high % of capital letters in a string

2002-06-06 Thread Justin French
Hi, How would I determine if there was a high % (say > 40%) of capital letters in a string? I'm trying to think of a way of preventing endless use of capital letters in a message board, to stop YELLERS. Justin French Creative Director http://Indent.com.au --