Methods summary
public static
string
|
#
iReplaceOnce( string $find, string $replace, string $subject )
Replaces a string only once
Replaces a string only once
Caution: This function only takes strings as parameters, not arrays!
Parameters
- $find
- String to find
- $replace
- String to replace
- $subject
- String to process
Returns
string Processed string
|
public static
string
|
#
iReplaceOnceReverse( string $find, string $replace, string $subject )
Replaces a string only once, in reverse direction
Replaces a string only once, in reverse direction
Caution: This function only takes strings as parameters, not arrays!
Parameters
- $find
- String to find
- $replace
- String to replace
- $subject
- String to process
Returns
string Processed string
|
public static
string
|
#
posReverse( string $haystack, string $needle, integer $start = 0 )
Finds a string position in reverse direction
Finds a string position in reverse direction
NOTE: The original strrpos-Function of PHP4 only finds a single character as needle.
Parameters
- $haystack
- String to search in
- $needle
- String to search for
- $start
- Offset
Returns
string Processed string
|
public static
string|array
|
#
addSlashes( string|array $value )
Adds slashes to passed variable or array.
Adds slashes to passed variable or array.
Parameters
- $value
- Either a string or a multi-dimensional array of values
Returns
string|array
|
public static
string|array
|
#
stripSlashes( string|array $value )
Removes slashes from passed variable or array.
Removes slashes from passed variable or array.
Parameters
- $value
- Either a string or a multi-dimensional array of values
Returns
string|array
|
public static
boolean
|
#
endsWith( string $haystack, string $needle )
Checks if the string haystack ends with needle
Checks if the string haystack ends with needle
Parameters
- $haystack
- The string to check
- $needle
- The string with which it should end
Returns
boolean
|
public static
boolean
|
#
contains( string $haystack, string $needle )
Returns true if needle can be found in haystack
Returns true if needle can be found in haystack
Parameters
- $haystack
- String to be searched
- $needle
- String to search for
Returns
boolean
|
public static
string
|
#
strstr( string $haystack, string $needle, string $beforeNeedle = false )
Implementation of PHP 5.3's strstr with beforeNeedle
Implementation of PHP 5.3's strstr with beforeNeedle
Parameters
- $haystack
- String to be searched
- $needle
- String to search for
- $beforeNeedle
- If true, return everything BEFORE needle
Returns
string
Link
|
public static
boolean
|
#
validateDateFormat( string $format )
This function checks if a given format is accepted by php's date function
This function checks if a given format is accepted by php's date function
Parameters
- $format
- format according to date function specification
Returns
boolean true if format is correct, false otherwise
|