コード例 #1
0
 private function ToCamelCase($name)
 {
     $result = '';
     $reader = new System\StringReader($name);
     $nextUp = true;
     while (false !== ($ch = $reader->ReadChar())) {
         if (ctype_punct($ch) || ctype_space($ch)) {
             $nextUp = true;
             continue;
         }
         if (System\String::IsLetter($ch)) {
             if ($nextUp) {
                 $result .= System\String::ToUpper($ch);
                 $nextUp = false;
             } else {
                 $result .= $ch;
             }
         }
         //else skip.
     }
     return $result;
 }