function ByteString::camel
Overrides AbstractString::camel
1 call to ByteString::camel()
- ByteString::snake in vendor/
symfony/ string/ ByteString.php
File
-
vendor/
symfony/ string/ ByteString.php, line 108
Class
- ByteString
- Represents a binary-safe string of bytes.
Namespace
Symfony\Component\StringCode
public function camel() : static {
$str = clone $this;
$parts = explode(' ', trim(ucwords(preg_replace('/[^a-zA-Z0-9\\x7f-\\xff]++/', ' ', $this->string))));
$parts[0] = 1 !== \strlen($parts[0]) && ctype_upper($parts[0]) ? $parts[0] : lcfirst($parts[0]);
$str->string = implode('', $parts);
return $str;
}