Str
class Str
Methods
Removes accents from string
Removes anything that is not a letter, number, or space
Removes accents, makes string lowercase, replaces multiple spaces with $space
Generates a random string of $lengh length
Generates an only letters string of $lenght length
Remove all spaces from given string
Details
at line 12
static string
remove_accents(string $string)
Removes accents from string
at line 32
static string
remove_symbols(string $string, array $except = [])
Removes anything that is not a letter, number, or space
at line 48
static string
sanitize_string(string $string, string $space = "", array $include_chars = [])
Removes accents, makes string lowercase, replaces multiple spaces with $space
at line 76
static string
rand_str(int $length = 40)
Generates a random string of $lengh length
Max length 40 chars. To be used for purposes where safety is not necessary.
at line 91
static string
rand_letters_string(int $length = 10)
Generates an only letters string of $lenght length
To be used for purposes where safety is not necessary. Eg. For the id of an HTML element.
at line 102
static void
remove_spaces(string $subject, string $replace = "")
Remove all spaces from given string