abbreviate_string (line
226)
Truncate string if it is longer than the allowed length.
Replace the middle or the ending part of a string with a placeholder.
string
abbreviate_string
(string $str, int $maxlength, [string $placeholder = '...'], [bool $ending = false])
-
string
$str: Input string
-
int
$maxlength: Max. length
-
string
$placeholder: Replace removed chars with this
-
bool
$ending: Set to True if string should be truncated from the end
array_keys_recursive (line
253)
Get all keys from array (recursive).
array
array_keys_recursive
(array $array)
-
array
$array: Input array
asciiwords (line
273)
Remove all non-ascii and non-word chars except ., -, _
void
asciiwords
( $str, [ $css_id = false], [ $replace_with = ''])
-
$str
-
$css_id
-
$replace_with
format_email (line
353)
Format e-mail address
string
format_email
(string $email)
-
string
$email: E-mail address
format_email_recipient (line
329)
Compose a valid representation of name and e-mail address
string
format_email_recipient
(string $email, [string $name = ''])
-
string
$email: E-mail address
-
string
$name: Person name
get_offset_sec (line
175)
Returns number of seconds for a specified offset string.
int
get_offset_sec
(string $str)
-
string
$str: String representation of the offset (e.g. 20min, 5h, 2days, 1week)
get_offset_time (line
209)
Create a unix timestamp with a specified offset from now.
int
get_offset_time
(string $offset_str, [int $factor = 1])
-
string
$offset_str: String representation of the offset (e.g. 20min, 5h, 2days)
-
int
$factor: Factor to multiply with the offset
idn_to_ascii (line
449)
void
idn_to_ascii
( $domain, [ $flags = null])
idn_to_utf8 (line
427)
intl replacement functions
void
idn_to_utf8
( $domain, [ $flags = null])
in_array_nocase (line
102)
Similar function as in_array() but case-insensitive
boolean
in_array_nocase
(string $needle, $haystack, array $heystack)
-
string
$needle: Needle value
-
array
$heystack: Array to search in
-
$haystack
is_ascii (line
288)
Check if a string contains only ascii characters
bool
is_ascii
(string $str, [bool $control_chars = true])
-
string
$str: String to check
-
bool
$control_chars: Includes control characters
mb_strlen (line
390)
mbstring replacement functions
void
mb_strlen
( $str)
mb_strpos (line
410)
void
mb_strpos
( $haystack, $needle, [ $offset = 0])
-
$haystack
-
$needle
-
$offset
mb_strrpos (line
415)
void
mb_strrpos
( $haystack, $needle, [ $offset = 0])
-
$haystack
-
$needle
-
$offset
mb_strtolower (line
395)
void
mb_strtolower
( $str)
mb_strtoupper (line
400)
void
mb_strtoupper
( $str)
mb_substr (line
405)
void
mb_substr
( $str, $start, [ $len = null])
parse_bytes (line
122)
Parse a human readable string for a number of bytes.
float
parse_bytes
(string $str)
-
string
$str: Input string
rcube_autoload (line
475)
Use PHP5 autoload for dynamic class loading
void
rcube_autoload
( $classname)
rcube_pear_error (line
509)
Local callback function for PEAR errors
void
rcube_pear_error
( $err)
slashify (line
153)
Make sure the string ends with a slash
void
slashify
( $str)
strip_newlines (line
315)
Remove new lines characters from given string
string
strip_newlines
(string $str)
strip_quotes (line
302)
Remove single and double quotes from a given string
string
strip_quotes
(string $str)
unslashify (line
162)
Remove slashes at the end of the string
void
unslashify
( $str)
version_parse (line
376)
Fix version number so it can be used correctly in version_compare()
void
version_parse
(string $version, return 1)
-
string
$version: Version number string
-
return
1: Version number string