chunk(1) instead. * * @see https://www.php.net/manual/en/function.explode * @param IString|string $separator The boundary string. * @param int $limit Maximum number of elements expected in the array. * @return array The resulting array of substrings. */ function split(IString|string $separator, int $limit = PHP_INT_MAX): array; /** * Splits a string in substring chunks of a given length. * * @see https://www.php.net/manual/en/function.str-split.php * @param int $chunkSize Maximum length of a chunk. * @return array The resulting array of substrings. */ function chunk(int $chunkSize): array; /** * Strip whitespace or other characters from the beginning and end of a string. * * @see https://www.php.net/manual/en/function.trim * @param IString|string $characters Characters to strip. * @return IString A new instance of IString with the characters removed. */ function trim(IString|string $characters = self::TRIM_CHARS): IString; /** * Strip whitespace or other characters from the beginning of a string. * * @see https://www.php.net/manual/en/function.ltrim.php * @param IString|string $characters Characters to strip. * @return IString A new instance of IString with the characters removed. */ function trimStart(IString|string $characters = self::TRIM_CHARS): IString; /** * Strip whitespace or other characters from the end of a string. * * @see https://www.php.net/manual/en/function.rtrim.php * @param IString|string $characters Characters to strip. * @return IString A new instance of IString with the characters removed. */ function trimEnd(IString|string $characters = self::TRIM_CHARS): IString; /** * Convert string to lowercase. * * @see https://www.php.net/manual/en/function.strtolower.php * @return IString A new IString instance with all lowercase characters. */ function toLower(): IString; /** * Convert string to uppercase. * * @see https://www.php.net/manual/en/function.strtoupper.php * @return IString A new IString instance with all uppercase characters. */ function toUpper(): IString; /** * Reverses a string. * * @see https://www.php.net/manual/en/function.strrev * @return IString A new IString instance containing the reversed string. */ function reverse(): IString; /** * Returns a copy of the standard PHP string. * * @return string PHP string. */ function __toString(): string; }