User Tools

Site Tools


functions:functions_list

FUNCTIONS



Functions lets you manipulate strings and/or numbers to fit your needs.
Usage description:

 $function(input-1 = "string", input-2 = integer[, optional input-3 = "string"/integer])


  • ALL string inputs containing alphabetic characters (a-z, A-Z) must be encapsulated with single or double quotes: “my string”, '123abc', “%s_variable%”, '%i_variable%'.
  • Functions that accept numbers do not need to be encapsulated with quotes.
  • If numeric character(s) (0-9) are used in functions that accept strings then the number will be treated as a string: 123 = “123”
  • All functions can be nested (functions within functions):$replace($left(“my strings”, 6), “my”, “your”) = “your str”
  • Nested function must NOT be encapsulated with quotes.See Nested Functions

Character String Functions

$leftGet string n-characters from the left side.
$trimlTrim string n-characters from the left side.
$rightGet string n-characters from the right side.
$trimrTrim string n-characters from the right side.
$middleGet string n-characters from n-position.
$betweenGet string between two strings.
$upperForce string to upper case.
$lowerForce string to lower case.
$properCapitalizes every first letter following a non-alphanumeric character.
$replaceReplace string in string.
$alrepReplace all non-alphanumeric characters and add optional exceptions.
$leadsAdd leading character(s) to a string. If string to fill is omitted a zero (0) will be used.
$trailsAdd trailing character(s) to a string. If fill-string is omitted a zero (0) will be used.
$stripwsRemoves leading and trailing white spaces.
$stripcrlfStrips string for line feed and carriage returns.
$isdigitCheck if string is only numbers. Success returns 1, failure returns 0.
$isalphaCheck if string is only alphabetic letters. Success returns 1, failure returns 0.
$lengthRetrieves length of the string (number of characters).
$reverseReverse a string.

Mathematics Functions

$roundRound number to nearest decimal.
$rounddRound number down to nearest integer.
$rounduRound number up to nearest integer.
$inttotcConvert integer to time code.
$tctosecConvert time code to seconds.
$absReturns the absolute value of a number.
$logReturns the natural logarithm of a number.
$randomReturns a random integer number between two integers.

Other Functions

$existsThis is a file function that will tell if file(s) exists.
$base64Encodes the input string as base 64.
$jsonencodeConverts the input string to an JSON friendly string.
$jsongetRetrieves the value from a JSON object key. Here is an example to retrieve values from ffprobe
$readarrayReturns an instance from a valid array; “[data, data, etc…]”.
$regextThis is regular expression function. It extracts text based on recognition patterns.
$hexConverts a decimal integer to hexadecimal number.
$decConverts a hexadecimal number to decimal integer.
$guidReturns a random GUID/UUID.
$xxhashReturns an eight character hash for any file.
$readReads the contents of a any text file.
$urlencodeConverts the input string to an URL friendly string.

                                                                                                          Back to top

functions/functions_list.txt · Last modified: 2020/01/29 13:53 by benjamin