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

 

ReLoad

Keys


Functions

arraybrowsercolorcookiedatetimeDBdebugdeviceDSTequiverrorflagsfontformatgeo
holidayhtmlisjsonmathparsePHPprintsearchsortstringtabletexttracetype
VOTDweatherxml

Function  myTrim   Lines 1495-1515 (20 lines) file  utils.php   Last mod: Fri 2021-05-14 21:45:07

function myTrim $a )
        {
#-k     string format
#       Specialized TRIM function

        
$b '';
        
$pc 32;
        for ( 
$i=0$i strlen($a); $i++ )
                {
                
$ch $a[$i];

                if (
ord($ch) > 32)      { $b .= $ch; } else
                if (
ord($pc) > 32)      { $b .= ' '; }          # note 1

                
$pc $ch;
                }

        return 
trim $b );
# note 1: don't actually want to put a blank here if the next character is one of these: ?!)}];:.,<
        
}

?>