\DeviceAtlas\DeviceUtil

Summary

Methods
Properties
Constants
isDigit()
splitString()
convertToLowercase()
isNumeric()
strEqualsIgnoreCase()
No public properties found
ASCII_UPPER_A
ASCII_UPPER_Z
CASE_CONVERSION_OFFSET
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Constants

ASCII_UPPER_A

ASCII_UPPER_A = 65

ASCII_UPPER_Z

ASCII_UPPER_Z = 90

CASE_CONVERSION_OFFSET

CASE_CONVERSION_OFFSET = 32

Methods

isDigit()

isDigit(  $c) 

Parameters

$c
Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275

splitString()

splitString(  $stringToSplit,   $delimiter) 

Parameters

$stringToSplit
$delimiter
Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275

convertToLowercase()

convertToLowercase(  $char) : mixed

Convert a character in ASCII to lower case.

Parameters

$char
Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275

Returns

mixed

isNumeric()

isNumeric(  $str,   $separator,   $minSeparatorCount,   $maxSeparatorCount) : boolean

Validate a positive numeric string with an optional separator. This method avoids converting the string to another data type as it is more performant not to and also allows validation of ratios and version numbers.

Integers: isNumeric("1234", '\0', 0, 0); Floats: isNumeric("12.34", '.', 1, 1); Versions: isNumeric("110.56.67", '.', 0, 2); Ratios: isNumeric("375/812", '/', 1, 1);

Parameters

$str
$separator
$minSeparatorCount
$maxSeparatorCount
Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275

Returns

boolean

strEqualsIgnoreCase()

strEqualsIgnoreCase(string  $var1, string  $var2) : boolean

Case-insensitive string comparrison

Parameters

string $var1
string $var2
Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275

Returns

boolean