Warning: Invalid argument supplied for foreach() in /home/jihswbiz/public_html/t6.gwilt.org/refDox.php on line 212
Docs-ASCII

 

ReLoad

Keys


Functions

arraybrowsercolorcookiedatetimeDBdebugdeviceDSTequiverrorflagsfontformatgeo
holidayhtmlisjsonmathparsePHPprintsearchsortstringtabletexttracetype
VOTDweatherxml

Function  ASCII   Lines 121-152 (31 lines) file  utils.php   Last mod: Fri 2021-05-14 21:45:07

function ASCII $a )
        {
#-k     string print format
#-      prints totals of each ASCII character found in $a

        
$asc1 'N00000000TL1FC1111112222222E2233';
        
$asc2 'L12345678BF1FR4567890123456C8901';

        for (
$i=0;$i<strlen($a);$i++)
                {
                
$x ord($a[$i]);
                
$asciitbl[$x]++;
                if ((
$x >=  0) && ($x <=  31))          $asciitbl['contr']++;
                elseif ((
$x >= 48) && ($x <=  57))      $asciitbl['numer']++;
                elseif ((
$x >= 64) && ($x <=  90))      $asciitbl['upper']++;
                elseif ((
$x >= 97) && ($x <= 122))      $asciitbl['lower']++;
                else                                    
$asciitbl['speci']++;

                }

        for (
$i=0;$i<32;$i++)
                
prt $i '[' $asc1[$i] . $asc2[$i] . ']=' $asciitbl[$i] );
        for (
$i=32;$i<127;$i++)
                
prt $i '[' chr($i) . ']=' $asciitbl[$i] );

        
prt '  control: ' $asciitbl['contr'] );
        
prt '  numeric: ' $asciitbl['numer'] );
        
prt 'uppercase: ' $asciitbl['upper'] );
        
prt 'lowercase: ' $asciitbl['lower'] );
        
prt '  special: ' $asciitbl['speci'] );
        }

?>