Example #1
0
 /**
  * Converts the value to camel-case format
  * @param php string $separator
  * @return php string
  */
 public function toCamelCase($separator = ' ')
 {
     $complete = '';
     $parts = $this->explode($separator);
     foreach ($parts->value() as $key => $part) {
         $part = new \NG\Root\Type\TString($part);
         if ($key == 0) {
             $complete = $part->toLowerCase()->value();
         } else {
             $complete .= $part->ucfirst()->value();
         }
     }
     $cut = new \NG\Root\Type\TString($complete);
     return $cut->cut(1, $cut->length() - 1);
 }