The data file built-in functions

chopPath

Usage  chopPath(path)
Parameters path - An expression which evaluates to a string
Description  The argument is interpreted as a hierarchy/data path (a list of path names, separated by "/" characters). The final name in the sequence (including any preceding/trailing "/" characters) will be removed, and the resulting value will be returned. If there is no final component to trim (for example, because the original path is the empty string), null will be returned.

More precisely, if the argument ends with a "/", it will be removed. Then, the last "/" in the string will be located, and it all all characters after it will be removed. The resulting string is returned. If no slash was found, null is returned.

Examples  chopPath("/Project/My Project/Time") returns "/Project/My Project"
chopPath("/foo/bar/baz") returns "/foo/bar"
chopPath("/foo/bar/") returns "/foo"
chopPath("/foo") returns ""
chopPath("/") returns null
chopPath("") returns null
chopPath("not really a path") returns null


count

Usage  count(arguments, ...)
Parameters arguments - one or more of expressions, separated by commas
Description  Counts the number of items in one or more lists, and returns the integer result.

Each of the arguments is evaluated. If any argument is a list expression, the argument is replaced by the contents of the list. This step is performed recursively until no lists remain. Then, the number of resulting items is counted and returned.

Examples  count("a", "b", "c") returns 3
count(",a,b,c,") returns 3
count([List]) returns the number of items in [List]
sum([List]) / count([List]) returns the average of the numbers in [List]


defined

Usage  defined(expression)
Parameters expression - any expression
Description  Returns true if the expression is not null, false otherwise.


endsWith

Usage  endsWith(string1, string2)
endsWith(string1)
Parameters string1 - An expression which evaluates to a string
string2 (optional) - An expression which evaluates to a string. If string2 is omitted, the value of the variable [_] will be used instead.
Description  Returns true if string1 ends with string2, false otherwise.
Examples  endsWith("foo", "bar") returns false
endsWith("foo", "oo") returns true
endsWith("/Project/My Project/Code", "/Code") returns true


esc


eval



filter



iff


indirect


join


list


listFor


map


match


max


maxDate


min


sort


startsWith


sumFor