Skip to content

StrOpColl is a PHP class which contains functions for common string operations.

Notifications You must be signed in to change notification settings

suleszabi/StrOpColl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

String operation collection

StrOpColl is a PHP class which contains functions for common string operations.

Instanceing the class is not necessary because the functions are static.

Functions

isStringContainNumber

isStringContainNumber(string $stringToCheck): bool

Finds whether the given string is contain number.

isStringContainLowercase

isStringContainLowercase(string $stringToCheck): bool

Finds whether the given string is contain lowercase.

isStringContainUppercase

isStringContainUppercase(string $stringToCheck): bool

Finds whether the given string is contain uppercase.

checkStringLength

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

isStringEmail($stringToCheck): bool

Finds whether the given string has email format.

isStringsAreEqual

isStringsAreEqual(string ...$strings): bool

Finds whether the given strings are equal.

generateRandomString

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

encryptWithSalt($stringToEncrypt, $salt):string

It concatenate the given string and the given salt then encrypt the result with using sha512 and md5 algorithm.

About

StrOpColl is a PHP class which contains functions for common string operations.

Topics

Resources

Stars

Watchers

Forks

Languages