public static function copyValueOf($charList): self
    {
        Assert::typeOf(['string', 'array', __CLASS__], $charList);

        // Convert to native string before creating a new string object
        $string = '';

        if (\is_array($charList)) {
            foreach ($charList as $value) {
                $string .= static::valueOf($value);
            }
        } else {
            $string = (string) $charList;
        }

        return new static($string);
    }
public static function copyValueOf($charList): self
    {
        Assert::typeOf(['string', 'array', __CLASS__], $charList);

        // Convert to native string before creating a new string object
        $string = '';

        if (\is_array($charList)) {
            foreach ($charList as $value) {
                $string .= static::valueOf($value);
            }
        } else {
            $string = (string) $charList;
        }

        return new static($string);
    }
public static function copyValueOf ( $ charList ) : self { Assert :: typeOf ( [ 'string' , 'array' , __CLASS__ ] , $ charList ) ; // Convert to native string before creating a new string object $ string = '' ; if ( \ is_array ( $ charList ) ) { foreach ( $ charList as $ value ) { $ string .= static :: valueOf ( $ value ) ; } } else { $ string = ( string ) $ charList ; } return new static ( $ string ) ; }
Returns a string that represents the character sequence in the array specified

@param static|string|array $charList
@return static
@throws InvalidArgumentException
@throws TypeError
Returns a string that represents the character sequence in the array specified