String utilities.
More...
|
static | startswith ($hay, $needle) |
|
static | contains ($needle, $haystack) |
|
static | containsValues (array $values, string $haystack) |
|
static | endswith ($hay, $needle) |
|
static | getBooleanStr ($value) |
|
static | isNull ($s) |
|
static | isNotNull ($s) |
|
static | isBooleanTrue ($s) |
|
static | isBooleanFalse ($s) |
|
static | isBoolean ($value) |
|
static | isBooleanStr ($value) |
|
static | pluralize ($count, $zero, $one, $other) |
| Pluralize an expression.
|
|
static | firstReplace ($haystack, $needle, $replace) |
|
static | replaceFirstOccurrence ($pattern, $replacement, $subject) |
|
static | replaceArray ($haystack, $needleArray, $replace) |
|
static | doubleBackSlashes ($value) |
|
static | cleanAttribute ($attr, $replacement="-") |
|
static | mask ($secretString, $maskChar="*") |
|
static | isValid ($value) |
|
static | isJson ($value) |
|
static | toString ($value) |
| Converts a value to a string.
|
|
static | explode ($delimiters, $string) |
| Explodes a string with an array of delimiters.
|
|
static | isExpression (string $v) |
| Returns true is value is a php expression.
|
|
String utilities.
Ubiquity\utils\base$UString This class is part of Ubiquity
- Author
- jcheron myadd.nosp@m.ress.nosp@m.mail@.nosp@m.gmai.nosp@m.l.com
- Version
- 1.0.6
Definition at line 15 of file UString.php.
◆ cleanAttribute()
static cleanAttribute |
( |
|
$attr, |
|
|
|
$replacement = "-" |
|
) |
| |
|
static |
◆ contains()
static contains |
( |
|
$needle, |
|
|
|
$haystack |
|
) |
| |
|
static |
◆ containsValues()
static containsValues |
( |
array |
$values, |
|
|
string |
$haystack |
|
) |
| |
|
static |
◆ doubleBackSlashes()
static doubleBackSlashes |
( |
|
$value | ) |
|
|
static |
◆ endswith()
static endswith |
( |
|
$hay, |
|
|
|
$needle |
|
) |
| |
|
static |
◆ explode()
static explode |
( |
|
$delimiters, |
|
|
|
$string |
|
) |
| |
|
static |
Explodes a string with an array of delimiters.
- Parameters
-
array | $delimiters | |
string | $string | |
- Returns
- array
Definition at line 152 of file UString.php.
◆ firstReplace()
static firstReplace |
( |
|
$haystack, |
|
|
|
$needle, |
|
|
|
$replace |
|
) |
| |
|
static |
◆ getBooleanStr()
static getBooleanStr |
( |
|
$value | ) |
|
|
static |
◆ isBoolean()
static isBoolean |
( |
|
$value | ) |
|
|
static |
◆ isBooleanFalse()
static isBooleanFalse |
( |
|
$s | ) |
|
|
static |
◆ isBooleanStr()
static isBooleanStr |
( |
|
$value | ) |
|
|
static |
◆ isBooleanTrue()
static isBooleanTrue |
( |
|
$s | ) |
|
|
static |
◆ isExpression()
static isExpression |
( |
string |
$v | ) |
|
|
static |
Returns true is value is a php expression.
- Parameters
-
- Returns
- bool
Definition at line 161 of file UString.php.
◆ isJson()
◆ isNotNull()
◆ isNull()
◆ isValid()
◆ mask()
static mask |
( |
|
$secretString, |
|
|
|
$maskChar = "*" |
|
) |
| |
|
static |
◆ pluralize()
static pluralize |
( |
|
$count, |
|
|
|
$zero, |
|
|
|
$one, |
|
|
|
$other |
|
) |
| |
|
static |
Pluralize an expression.
- Parameters
-
int | $count | the count of elements |
string | $zero | value to return if count==0, can contains {count} mask |
string | $one | value to return if count==1, can contains {count} mask |
string | $other | value to return if count>1, can contains {count} mask |
- Returns
- string the pluralized expression
Definition at line 75 of file UString.php.
◆ replaceArray()
static replaceArray |
( |
|
$haystack, |
|
|
|
$needleArray, |
|
|
|
$replace |
|
) |
| |
|
static |
◆ replaceFirstOccurrence()
static replaceFirstOccurrence |
( |
|
$pattern, |
|
|
|
$replacement, |
|
|
|
$subject |
|
) |
| |
|
static |
◆ startswith()
static startswith |
( |
|
$hay, |
|
|
|
$needle |
|
) |
| |
|
static |
◆ toString()
static toString |
( |
|
$value | ) |
|
|
static |
Converts a value to a string.
- Parameters
-
- Returns
- string
Definition at line 138 of file UString.php.
The documentation for this class was generated from the following file:
- C:/Users/myadd/Documents/GitHub/ubiquity-doc-api/vendor/phpmv/ubiquity/src/Ubiquity/utils/base/UString.php