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 $find String to find
- $replace
string $replace String to replace
- $subject
string $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 $find String to find
- $replace
string $replace String to replace
- $subject
string $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 $haystack String to search in
- $needle
string $needle String to search for
- $start
integer $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
string|array $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
string|array $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
string $haystack The string to check
- $needle
string $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 $haystack String to be searched
- $needle
string $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 $haystack String to be searched
- $needle
string $needle String to search for
- $beforeNeedle
string $beforeNeedle If true, return everything BEFORE needle
Returns
string
Link
|