StrOpColl
is a PHP class which contains functions for common string operations.
Instanceing the class is not necessary because the functions are static.
isStringContainNumber(string $stringToCheck): bool
Finds whether the given string is contain number.
isStringContainLowercase(string $stringToCheck): bool
Finds whether the given string is contain lowercase.
isStringContainUppercase(string $stringToCheck): bool
Finds whether the given string is contain uppercase.
checkStringLength(string $stringToCheck, int $minLength, int $maxLength): bool
Decides whether the given string is lower than given minimum and greater than the given maximum.
isStringEmail($stringToCheck): bool
Finds whether the given string has email format.
isStringsAreEqual(string ...$strings): bool
Finds whether the given strings are equal.
generateRandomString(int $stringLength, bool $caseSensitive = false, bool $specialChars = false): string
Generate a random string with the given length. Containing lower and uppercase letters or special characters are optional.
encryptWithSalt($stringToEncrypt, $salt):string
It concatenate the given string and the given salt then encrypt the result with using sha512
and md5
algorithm.