StringUtil Class Reference

Static Public Member Functions

static getChoppedStringContent ($string, $length, $ellipsis= '...')
static resolveOrdinalIntegerAsStringContent ($integer)
static renderFluidContent ($content)
static renderFluidTitleContent ($title)
static resolveCustomizedLabel ()
static uncamelize ($string)
static camelize ($string, $capitaliseFirstCharacter=false, $delimiter= '_')
static prependNewLine (&$content, $isHtmlContent)
static generateRandomString ($length=10, $characterSet=null)
static startsWith ($haystack, $needle)
static endsWith ($haystack, $needle)
static addSchemeIfMissing ($url, $scheme= 'http')

Detailed Description

Helper functionality for working with Strings

Definition at line 40 of file StringUtil.php.


Member Function Documentation

static getChoppedStringContent ( string,
length,
ellipsis = '...' 
) [static]

Given a string and a length, return the chopped string if it is larger than the length.

Parameters:
$string 
$length 
string $ellipsis
Returns:
string

Definition at line 49 of file StringUtil.php.

static resolveOrdinalIntegerAsStringContent ( integer  )  [static]

Given an integer, resolve the integer with an ordinal suffix and return the content as as string.

Parameters:
integer $number

Definition at line 67 of file StringUtil.php.

static resolveCustomizedLabel (  )  [static]

used for customizing label in UI

Definition at line 108 of file StringUtil.php.

static prependNewLine ( &$  content,
isHtmlContent 
) [static]

used to add a new line to content.

Parameters:
$content 
$isHtmlContent 

Definition at line 135 of file StringUtil.php.

static generateRandomString ( length = 10,
characterSet = null 
) [static]

Generate a random string

Parameters:
int $length
null $characterSet
Returns:
string

Definition at line 153 of file StringUtil.php.

static startsWith ( haystack,
needle 
) [static]
Parameters:
$haystack 
$needle 
Returns:
bool

Definition at line 174 of file StringUtil.php.

static endsWith ( haystack,
needle 
) [static]
Parameters:
$haystack 
$needle 
Returns:
bool

Definition at line 184 of file StringUtil.php.

static addSchemeIfMissing ( url,
scheme = 'http' 
) [static]

Add a default scheme to url

Parameters:
$url 
string $scheme
Returns:
string

Definition at line 195 of file StringUtil.php.


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables
Generated on Mon Oct 23 07:10:30 2017