Example #1
0
 /**
  * Changes underscored string to the camel case.
  *
  * Example:
  * <code>
  * $string = 'lannisters_always_pay_their_debts';
  * $camelcase = Strings::underscoreToCamelCase($string);
  * </code>
  * Result:
  * <code>
  * LannistersAlwaysPayTheirDebts
  * </code>
  *
  * @param string $string
  * @return string
  */
 public static function underscoreToCamelCase($string)
 {
     $words = explode('_', $string);
     $return = '';
     foreach ($words as $word) {
         $return .= Strings::uppercaseFirst(trim($word));
     }
     return $return;
 }