abbreviate_string (line
331)
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 $place_holder = '...'], [bool $ending = false])
-
string
$str: Input string
-
int
$maxlength: Max. length
-
string
$place_holder: Replace removed chars with this
-
bool
$ending: Set to True if string should be truncated from the end
array_keys_recursive (line
456)
Get all keys from array (recursive)
array
array_keys_recursive
(array $array)
-
array
$array: Input array
clear_directory (line
268)
Delete all files within a folder
boolean
clear_directory
(string $dir_path)
-
string
$dir_path: Path to directory
get_boolean (line
99)
Find out if the string content means TRUE or FALSE
boolean
get_boolean
(string $str)
get_offset_time (line
289)
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
535)
void
idn_to_ascii
( $domain, [ $flags = null])
idn_to_utf8 (line
513)
intl replacement functions
void
idn_to_utf8
( $domain, [ $flags = null])
in_array_nocase (line
82)
Similar function as in_array() but case-insensitive
boolean
in_array_nocase
(mixed $needle, array $haystack)
-
mixed
$needle: Needle value
-
array
$haystack: Array to search in
mb_strlen (line
476)
mbstring replacement functions
void
mb_strlen
( $str)
mb_strpos (line
496)
void
mb_strpos
( $haystack, $needle, [ $offset = 0])
-
$haystack
-
$needle
-
$offset
mb_strrpos (line
501)
void
mb_strrpos
( $haystack, $needle, [ $offset = 0])
-
$haystack
-
$needle
-
$offset
mb_strtolower (line
481)
void
mb_strtolower
( $str)
mb_strtoupper (line
486)
void
mb_strtoupper
( $str)
mb_substr (line
491)
void
mb_substr
( $str, $start, [ $len = null])
parse_bytes (line
115)
Parse a human readable string for a number of bytes
float
parse_bytes
(string $str)
-
string
$str: Input string
rcube_explode_quoted_string (line
430)
Explode quoted string
void
rcube_explode_quoted_string
(string $delimiter, string $string)
-
string
$delimiter: Delimiter expression string for preg_match()
-
string
$string: Input string
rc_image_content_type (line
412)
Detect image type of the given binary data by checking magic numbers
string
rc_image_content_type
(string $data)
-
string
$data: Binary file content
rc_mime_content_type (line
363)
A method to guess the mime_type of an attachment.
string
rc_mime_content_type
(string $path, string $name, [string $failover = 'application/octet-stream'], [string $is_stream = false])
-
string
$path: Path to the file.
-
string
$name: File name (with suffix)
-
string
$failover: Mime type supplied for failover.
-
string
$is_stream: Set to True if $path contains file body
rc_request_header (line
227)
Read a specific HTTP request header
mixed
rc_request_header
(string $name)
-
string
$name: Header name
rc_wordwrap (line
172)
Wrapper function for wordwrap
void
rc_wordwrap
( $string, [ $width = 75], [ $break = "\n"], [ $cut = false])
-
$string
-
$width
-
$break
-
$cut
send_future_expire_header (line
64)
Send header with expire date 30 days in future
void
send_future_expire_header
([int $offset = 2600000])
-
int
$offset: Expiration time in seconds
send_nocacheing_headers (line
36)
Send HTTP headers to prevent caching this page
void
send_nocacheing_headers
()
show_bytes (line
149)
Create a human readable string for a number of bytes
string
show_bytes
(int $bytes)
-
int
$bytes: Number of bytes
slashify (line
247)
Make sure the string ends with a slash
void
slashify
( $str)
unslashify (line
256)
Remove slash at the end of the string
void
unslashify
( $str)