Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ByteString.php

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\String

Code

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;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal