Returns a camelCase version of the supplied string. Trims surrounding
spaces, capitalizes letters following digits, spaces, dashes and
underscores, and removes spaces, dashes, underscores.

@return Stringy Object with $str in camelCase
761543
public function camelize() {
        $encoding = $this->encoding;
        $stringy = self::create($this->str, $this->encoding);

        $camelCase = preg_replace_callback(
                '/[-_\s]+(.)?/u', function ($match) use (&$encoding) {
            return $match[1] ? mb_strtoupper($match[1], $encoding) : "";
        }, $stringy->trim()->lowerCaseFirst()->str
        );

        $stringy->str = preg_replace_callback(
                '/[\d]+(.)?/u', function ($match) use (&$encoding) {
            return mb_strtoupper($match[0], $encoding);
        }, $camelCase
        );

        return $stringy;
    }
1247192
public static function underscoredToLowerCamelCase($string) {
		$upperCamelCase = str_replace(' ', '', ucwords(str_replace('_', ' ', self::strtolower($string))));
		$lowerCamelCase = self::lcfirst($upperCamelCase);
		return $lowerCamelCase;
	}
593340
public static function camelCase($string) {
        return static::cache(array(__METHOD__, $string), function() use ($string) {
            return str_replace(' ', '', mb_convert_case(str_replace(array('_', '-'), ' ', preg_replace('/[^-_a-z0-9\s]+/i', '', $string)), MB_CASE_TITLE));
        });
    }
997712
public function toUpperCamelCase($string)
  {
      $string = str_replace(array('-', '_'), ' ', $string);
      $string = ucwords(strtolower($string));
      $string = str_replace(' ', '', $string);

      return $string;
  }
1097881
public function toUpper()
        {
            $stringLen = strlen($this->dataStr);
            $p = 0;
            
            while ($p<$stringLen) {
                $mode = self::identifyMode(substr($this->dataStr, $p), $this->modeHint);
                if($mode == QR_MODE_KANJI) {
                    $p += 2;
                } else {
                    if (ord($this->dataStr[$p]) >= ord('a') && ord($this->dataStr[$p]) <= ord('z')) {
                        $this->dataStr[$p] = chr(ord($this->dataStr[$p]) - 32);
                    }
                    $p++;
                }
            }

            return $this->dataStr;
        }
1059824
function camelCase (str) {
  return str
    .replace(/_/g, (_, index) => index === 0 ? _ : '-')
    .replace(/(?:^\w|[A-Z]|\b\w)/g, (letter, index) =>
      index === 0 ? letter.toLowerCase() : letter.toUpperCase()
    )
    .replace(invalidChars, '')
}
268858
function camelCase($pString, $upperCaseFirst = FALSE)
    {
        $regEx = $upperCaseFirst
            ? '/(?:^|-)(.?)/'
            : '/(?:-)(.?)/';

        $filter = function ($p) {
            return \strtoupper($p[1]);
        };

        return \preg_replace_callback($regEx, $filter, $pString);
    }
414467
function camelCase(str) {
  if (str.indexOf('-') > -1) {
    str = str.replace(/-\w/g, function (letter) {
      return letter.substr(1).toUpperCase();
    });
  }

  return str;
}
390551
function camelCase(str) {
            return str.replace(reMs, "ms-").replace(reSnakeCase, function (all, letter) {
                return letter.toUpperCase();
            });
        }
1029927
public static function camelTo_($str) {
        if (!is_string($str))
            return '';
        $str[0] = strtolower($str[0]);
        $func = create_function('$c', 'return "_" . strtolower($c[1]);');
        return preg_replace_callback('/([A-Z])/', $func, $str);
    }
884852
public function toUpperCase() {
		$rawString = mb_strtoupper($this->rawString, $this->charset);

		return new static($rawString, $this->charset);
	}
179384
public function toCamelCase() : Manipulator
    {
        $modifiedString = '';

        foreach (explode(' ', $this->string) as $word) {
            $modifiedString .= self::make($word)->toLower()->capitalize()->toString();
        }

        $final = self::make($modifiedString)
            ->replace(' ', '')
            ->lowercaseFirst()
            ->toString();

        return new static($final);
    }
121634
private function underscoreToCamelcase($str)
    {
        // Split string in words.
        $words = explode('_', strtolower($str));

        $return = '';

        foreach ($words as $word) {
            $return .= ucfirst(trim($word));
        }

        return $return;
    }
44988
function camelCase(str, { upperCase = false } = {}) {
  if (str.length === 0) {
    return str;
  }

  if (upperCase && isAllUpperCaseSnakeCase(str)) {
    // Only convert to lower case if the string is all upper
    // case snake_case. This allowes camelCase strings to go
    // through without changing.
    str = str.toLowerCase();
  }

  let out = str[0];

  for (let i = 1, l = str.length; i < l; ++i) {
    const char = str[i];
    const prevChar = str[i - 1];

    if (char !== '_') {
      if (prevChar === '_') {
        out += char.toUpperCase();
      } else {
        out += char;
      }
    }
  }

  return out;
}
58502
function camelCase(s) {
  return s.toLowerCase().replace(/-(.)/g, function(m, g) {
    return g.toUpperCase()
  })
}
285666
private function toCamelCase($str)
    {
        // Split string in words.
        $words = preg_split('/[-_]/', strtolower($str)); //explode('_', strtolower($str));

        $return = '';
        foreach ($words as $word) {
            $return .= ucfirst(trim($word));
        }

        return $return;
    }
1059221
public static function camel2case($string, $delimiter = '_')
    {
        return ltrim(preg_replace_callback('/[A-Z]/', function ($mathes) use ($delimiter) {
            return $delimiter . strtolower($mathes[0]);
        }, $string), $delimiter);
    }