Utility functions.
More...
|
| static | checkRange ($name, Range $range, $value, $unit='') |
| | Asserts that value falls within range (inclusive), leaving room for slight floating-point errors.
|
| |
| static | encodeURIComponent ($string) |
| | Encode URI component.
|
| |
| static | mbChr ($code) |
| | mb_chr() wrapper
|
| |
| static | mbStrlen ($string) |
| | mb_strlen() wrapper
|
| |
| static | mbStrpos ($haystack, $needle, $offset=0) |
| | mb_strpos wrapper
|
| |
| static | mbSubstr ($string, $start, $length=null) |
| | mb_substr() wrapper
|
| |
◆ checkRange()
| static ScssPhp\ScssPhp\Util::checkRange |
( |
| $name, |
|
|
Range | $range, |
|
|
| $value, |
|
|
| $unit = '' ) |
|
static |
Asserts that value falls within range (inclusive), leaving room for slight floating-point errors.
- Parameters
-
| string | $name | The name of the value. Used in the error message. |
| Range | $range | Range of values. |
| array | Number | $value | The value to check. |
| string | $unit | The unit of the value. Used in error reporting. |
- Return values
-
| mixed | value adjusted to fall within range, if it was outside by a floating-point margin. |
- Exceptions
-
◆ encodeURIComponent()
| static ScssPhp\ScssPhp\Util::encodeURIComponent |
( |
| $string | ) |
|
|
static |
Encode URI component.
- Parameters
-
- Return values
-
◆ mbChr()
| static ScssPhp\ScssPhp\Util::mbChr |
( |
| $code | ) |
|
|
static |
mb_chr() wrapper
- Parameters
-
- Return values
-
◆ mbStrlen()
| static ScssPhp\ScssPhp\Util::mbStrlen |
( |
| $string | ) |
|
|
static |
mb_strlen() wrapper
- Parameters
-
- Return values
-
◆ mbStrpos()
| static ScssPhp\ScssPhp\Util::mbStrpos |
( |
| $haystack, |
|
|
| $needle, |
|
|
| $offset = 0 ) |
|
static |
mb_strpos wrapper
- Parameters
-
| string | $haystack | |
| string | $needle | |
| int | $offset | |
- Return values
-
◆ mbSubstr()
| static ScssPhp\ScssPhp\Util::mbSubstr |
( |
| $string, |
|
|
| $start, |
|
|
| $length = null ) |
|
static |
mb_substr() wrapper
- Parameters
-
| string | $string | |
| int | $start | |
| null | int | $length | |
- Return values
-
The documentation for this class was generated from the following file: