[ Index ]

PHP Cross Reference of osCMax 2.0.4

title

Body

[close]

/admin/includes/functions/ -> ship_fedex.php (source)

   1  <?php
   2  /*

   3  $Id: ship_fedex.php 3 2006-05-27 04:59:07Z user $

   4  

   5    osCMax Power E-Commerce

   6    http://oscdox.com

   7  

   8    Copyright 2006 osCMax

   9  

  10    Released under the GNU General Public License

  11  */
  12    
  13    function name_case($name){
  14     $newname = strtoupper($name[0]);   
  15     for ($i=1; $i < strlen($name); $i++)
  16     {
  17         $subed = substr($name, $i, 1);   
  18         if (((ord($subed) > 64) && (ord($subed) < 123)) ||
  19             ((ord($subed) > 48) && (ord($subed) < 58)))
  20         {
  21             $word_check = substr($name, $i - 2, 2);
  22             if (!strcasecmp($word_check, 'Mc') || !strcasecmp($word_check, "O'"))
  23             {
  24                 $newname .= strtoupper($subed); 
  25             }
  26             else if ($break)
  27             {
  28                
  29                 $newname .= strtoupper($subed);
  30             }
  31             else     
  32             {
  33                 $newname .= strtolower($subed);
  34             }
  35               $break=0;
  36         }
  37         else
  38         {
  39             // not a letter - a boundary

  40               $newname .= $subed;
  41             $break=1;
  42         }
  43     }   
  44     return $newname;
  45  }  
  46  
  47  ?>


Generated: Fri Jan 1 13:43:16 2010 Cross-referenced by PHPXref 0.7