Str
class Str (View source)
Methods
Make a list with literals or nested lists.
Make one or more literals.
Resolve the value of the given enums.
Resolve the value of the given enum.
Make a range set for use in a search command.
Make a credentials string for use in the AUTHENTICATE command.
Prefix a string with the given prefix if it does not already start with it.
Escape a string for use in a list.
Decode a modified UTF-7 string (IMAP specific) to UTF-8.
Encode a UTF-8 string to modified UTF-7 (IMAP specific).
Determine if a given string matches a given pattern.
Details
static string
list(array $list)
Make a list with literals or nested lists.
static array|string
literal(array|string $string)
Make one or more literals.
static array|string|null
enums(BackedEnum|array|string|null $enums = null)
Resolve the value of the given enums.
static string
enum(BackedEnum|string $enum)
Resolve the value of the given enum.
static string
set(int|string|array $from, int|float|string|null $to = null)
Make a range set for use in a search command.
static string
credentials(string $user, string $token)
Make a credentials string for use in the AUTHENTICATE command.
static string
prefix(string $value, string $prefix)
Prefix a string with the given prefix if it does not already start with it.
static string
escape(string $string)
Escape a string for use in a list.
static string
fromImapUtf7(string $string)
Decode a modified UTF-7 string (IMAP specific) to UTF-8.
static string
toImapUtf7(string $string)
Encode a UTF-8 string to modified UTF-7 (IMAP specific).
static
is(array|string $pattern, string $value, bool $ignoreCase = false)
Determine if a given string matches a given pattern.