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

Breadcrumb

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

function CodePointString::__construct

Overrides AbstractString::__construct

File

vendor/symfony/string/CodePointString.php, line 27

Class

CodePointString
Represents a string of Unicode code points encoded as UTF-8.

Namespace

Symfony\Component\String

Code

public function __construct(string $string = '') {
    if ('' !== $string && !preg_match('//u', $string)) {
        throw new InvalidArgumentException('Invalid UTF-8 string.');
    }
    $this->string = $string;
}
RSS feed
Powered by Drupal