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

Breadcrumb

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

function UnicodeString::append

Overrides AbstractString::append

File

vendor/symfony/string/UnicodeString.php, line 48

Class

UnicodeString
Represents a string of Unicode grapheme clusters encoded as UTF-8.

Namespace

Symfony\Component\String

Code

public function append(string ...$suffix) : static {
    $str = clone $this;
    $str->string = $this->string . (1 >= \count($suffix) ? $suffix[0] ?? '' : implode('', $suffix));
    if (normalizer_is_normalized($str->string)) {
        return $str;
    }
    if (false === ($string = normalizer_normalize($str->string))) {
        throw new InvalidArgumentException('Invalid UTF-8 string.');
    }
    $str->string = $string;
    return $str;
}

API Navigation

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