Methods summary
final public
|
#
__construct( )
This faux constructor method throws a caller exception.
The String object should never be instantiated, and this constructor
override simply guarantees it.
This faux constructor method throws a caller exception.
The String object should never be instantiated, and this constructor
override simply guarantees it.
Throws
|
final public static
string
|
#
FirstCharacter( string $strString )
Returns the first character of a given string, or null if the given
string is null.
Returns the first character of a given string, or null if the given
string is null.
Parameters
Returns
string the first character, or null
|
final public static
string
|
#
LastCharacter( string $strString )
Returns the last character of a given string, or null if the given
string is null.
Returns the last character of a given string, or null if the given
string is null.
Parameters
Returns
string the last character, or null
|
final public static
boolean
|
#
StartsWith( string $strHaystack, string $strNeedle )
Checks whether a given string starts with another (sub)string
Checks whether a given string starts with another (sub)string
Parameters
Returns
boolean
|
final public static
boolean
|
#
EndsWith( string $strHaystack, string $strNeedle )
Checks whether a given string ends with another (sub)string
Checks whether a given string ends with another (sub)string
Parameters
Returns
boolean
|
final public static
string
|
#
Truncate( string $strText, integer $intMaxLength )
Truncates the string to a given length, adding elipses (if needed).
Truncates the string to a given length, adding elipses (if needed).
Parameters
- $strText
- string to truncate
- $intMaxLength
- the maximum possible length of the string to return (including length of the elipse)
Returns
string the full string or the truncated string with eplise
|
final public static
string
|
#
XmlEscape( string $strString )
Escapes the string so that it can be safely used in as an Xml Node (basically, adding CDATA if needed)
Escapes the string so that it can be safely used in as an Xml Node (basically, adding CDATA if needed)
Parameters
- $strString
- string to escape
Returns
string the XML Node-safe String
|
final public static
|
|