Ubiquity  2.0.2
php rapid development framework
UString Class Reference

String utilities. More...

Static Public Member Functions

static startswith ($hay, $needle)
 
static endswith ($hay, $needle)
 
static getBooleanStr ($value)
 
static isNull ($s)
 
static isNotNull ($s)
 
static isBooleanTrue ($s)
 
static isBooleanFalse ($s)
 
static isBoolean ($value)
 
static pluralize ($count, $zero, $one, $other)
 Pluralize an expression. More...
 
static firstReplace ($haystack, $needle, $replace)
 
static replaceArray ($haystack, $needle, $replaceArray)
 
static cleanAttribute ($attr, $replacement="_")
 

Detailed Description

String utilities.

Author
jc
Version
1.0.0.2

Definition at line 10 of file UString.php.

Member Function Documentation

◆ cleanAttribute()

static cleanAttribute (   $attr,
  $replacement = "_" 
)
static

Definition at line 84 of file UString.php.

◆ endswith()

static endswith (   $hay,
  $needle 
)
static

Definition at line 16 of file UString.php.

◆ firstReplace()

static firstReplace (   $haystack,
  $needle,
  $replace 
)
static

Definition at line 67 of file UString.php.

◆ getBooleanStr()

static getBooleanStr (   $value)
static

Definition at line 20 of file UString.php.

◆ isBoolean()

static isBoolean (   $value)
static

Definition at line 43 of file UString.php.

◆ isBooleanFalse()

static isBooleanFalse (   $s)
static

Definition at line 39 of file UString.php.

◆ isBooleanTrue()

static isBooleanTrue (   $s)
static

Definition at line 35 of file UString.php.

◆ isNotNull()

static isNotNull (   $s)
static

Definition at line 31 of file UString.php.

◆ isNull()

static isNull (   $s)
static

Definition at line 27 of file UString.php.

◆ pluralize()

static pluralize (   $count,
  $zero,
  $one,
  $other 
)
static

Pluralize an expression.

Parameters
int$countthe count of elements
string$zerovalue to return if count==0, can contains {count} mask
string$onevalue to return if count==1, can contains {count} mask
string$othervalue to return if count>1, can contains {count} mask
Returns
string the pluralized expression

Definition at line 55 of file UString.php.

◆ replaceArray()

static replaceArray (   $haystack,
  $needle,
  $replaceArray 
)
static

Definition at line 76 of file UString.php.

◆ startswith()

static startswith (   $hay,
  $needle 
)
static

Definition at line 12 of file UString.php.


The documentation for this class was generated from the following file: