XtScript functions
The functions are roughly equivalent to their PHP counterparts, although some PHP parameters may not be available.
A B C D F H L M N O P R S T U
A
- abs Returns the absolute value of a number
- addslashes Returns a string with backslashes before single quotes double quotes backslashes and NUL
B
- base64 decode Decodes data encoded with base64_encode
- base64 encode Encodes data with base64
- bin2hex Returns binary data in $val in hexadecimal format
- br2nl Replaces HTML line breaks with newlines in a string
C
- ceil Round fractions up
- chr Returns the character with the given numeric value
- crc32 Calculates the crc32 polynomial of a string
D
- dechex Converts decimal numbers to hexadecimal
F
- floor Round fractions down
H
- hex2bin Decodes a hexadecimally encoded binary string
- hexdec Converts hexadecimal numbers to decimal
- htmlspecialchars convert reserved characters to html entities
L
- lcfirst Make a string's first character lowercase
- ltrim Remove whitespace (or other characters) from the beginning of a string
M
- md5 Calculate the md5 hash of a string
- mt rand create a random number between $min and $max
N
- nl2br Inserts HTML line breaks before all newlines in a string Newlines are NOT deleted
O
- ord Returns the numeric value of the given character
P
- pi The value of PI The ratio of the radius of a circle to its circumference
- pow Returns $num raised to the power of $exp
R
- rawurldecode Decodes a rawurlencoded string
- rawurlencode Render a string safe for use in an url
- round Rounds up or down a floating point number
- rtrim Remove whitespace (or other characters) from the end of a string
S
- sha1 Calculate the sha1 hash of a string
- str ireplace Find all occurrences of a case insensitive sub-string within a string and replace them wit…
- str pad Pad a string to a specified minimum length from another string
- str repeat Repeat a string
- str replace Find all occurrences of a sub-string within a string and replace them with another sub-str…
- str shuffle Randomly shuffle a string
- strip tags Remove HTML and PHP tags from a string
- stripos Find the position of the first occurrence of a case-insensitive substring in a string
- stripslashes Removes backslashes before single quotes ( ' ), double quotes ( " ), backslashes ( \ ) and…
- stristr Returns all of $haystack starting from and including the first occurrence of case-insensit…
- strlen Return the length of a string
- strpos Find the position of the first occurrence of a substring in a string
- strrchr Find the last occurrence of a character in a string
- strrev Reverse a string
- strripos Find the position of the last occurrence of a case-insensitive substring in a string
- strrpos Find the position of the last occurrence of a substring in a string
- strstr Returns all of $haystack starting from and including the first occurrence of $needle to th…
- strtolower Make a string lowercase
- strtoupper Make a string uppercase
- substr Return part of a string
T
- trim Remove whitespace (or other characters) from the beginning and end of a string
U
- ucfirst Make a string's first character uppercase
- ucwords Uppercase the first character of each word in a string
- urldecode Decodes a urlencoded string
- urlencode Render a string safe for use in an url