Package org.openrefine.grel
Class FunctionDescription
- java.lang.Object
-
- org.openrefine.grel.FunctionDescription
-
public class FunctionDescription extends Object
Generated localization support class.
-
-
Constructor Summary
Constructors Constructor Description FunctionDescription()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.jvnet.localizer.Localizable
_arr_args_to_array()
Keyarr_args_to_array
:Returns all arguments passed to it as an array
.static org.jvnet.localizer.Localizable
_arr_in_array()
Keyarr_in_array
:Returns true if the array contains the desired string, and false otherwise. Will not convert data types.
.static org.jvnet.localizer.Localizable
_arr_join()
Keyarr_join
:Joins the items in the array with sep, and returns it all as a string.
.static org.jvnet.localizer.Localizable
_arr_reverse()
Keyarr_reverse
:Reverses array a.
.static org.jvnet.localizer.Localizable
_arr_sort()
Keyarr_sort
:Sorts the array in ascending order. Sorting is case-sensitive, uppercase first and lowercase second.
.static org.jvnet.localizer.Localizable
_arr_uniques()
Keyarr_uniques
:Returns the array with duplicates removed. Case-sensitive.
.static org.jvnet.localizer.Localizable
_bool_and()
Keybool_and
:Uses the logical operator AND on two or more booleans to output a boolean. Evaluates multiple statements into booleans, then returns true if all the statements are true. For example, (1 < 3).and(1 < 0) returns false because one condition is true and one is false.
.static org.jvnet.localizer.Localizable
_bool_not()
Keybool_not
:Uses the logical operator NOT on a boolean to output a boolean. For example, not(1 > 7) returns true because 1 > 7 itself is false.
.static org.jvnet.localizer.Localizable
_bool_or()
Keybool_or
:Uses the logical operator OR on two or more booleans to output a boolean. For example, (1 < 3).or(1 > 7) returns true because at least one of the conditions (the first one) is true.
.static org.jvnet.localizer.Localizable
_bool_xor()
Keybool_xor
:Uses the logical operator XOR (exclusive-or) on two or more booleans to output a boolean. Evaluates multiple statements, then returns true if only one of them is true. For example, (1 < 3).xor(1 < 7) returns false because more than one of the conditions is true.
.static org.jvnet.localizer.Localizable
_date_inc()
Keydate_inc
:Returns a date changed by the given amount in the given unit of time, in quotes. See https://openrefine.org/docs/manual/grelfunctions/#incd-n-s-timeunit for a table. The default unit is ''hour''. A positive value increases the date, and a negative value moves it back in time.
.static org.jvnet.localizer.Localizable
_date_now()
Keydate_now
:Returns the current time according to your system clock, in the ISO 8601 extended format (converted to UTC). For example, 10:53am (and 00 seconds) on November 26th 2020 in EST returns [date 2020-11-26T15:53:00Z].
.static org.jvnet.localizer.Localizable
_date_part()
Keydate_part
:Returns part of a date. The data type returned depends on the unit. See https://openrefine.org/docs/manual/grelfunctions/#datepartd-s-timeunit, https://openrefine.org/docs/manual/grelfunctions#date-functions for a table.
.static org.jvnet.localizer.Localizable
_fun_coalesce()
Keyfun_coalesce
:Returns the first non-null from a series of objects (meaning any data type - string, date, number, boolean, etc.).
.static org.jvnet.localizer.Localizable
_fun_cross()
Keyfun_cross
:Looks up the given value in the target column of the target project, returns an array of matched rows. Two values match if and only if they have the same string representation. The first argument will be interpreted as cell.value if set to cell. The second argument will be interpreted as the current project name if omitted or set to "". The third argument will be interpreted as the index (starts from 0) column if omitted or set to "".
.static org.jvnet.localizer.Localizable
_fun_facet_count()
Keyfun_facet_count
:Returns the facet count corresponding to the given choice value, by looking for the facetExpression in the choiceValue in columnName.
.static org.jvnet.localizer.Localizable
_fun_get()
Keyfun_get
:If o has named fields, returns the field named ''from'' of o. If o is an array, returns a sub-array o[from, to]. if o is a string, returns o.substring(from, to).
.static org.jvnet.localizer.Localizable
_fun_has_field()
Keyfun_has_field
:Returns a boolean indicating whether o has a member field called name.
.static org.jvnet.localizer.Localizable
_fun_jsonize()
Keyfun_jsonize
:Quotes a value as a JSON literal value.
.static org.jvnet.localizer.Localizable
_fun_length()
Keyfun_length
:Returns the length of string s as a number, or the size of array a, meaning the number of objects inside it. Arrays can be empty, in which case length() will return 0.
.static org.jvnet.localizer.Localizable
_fun_slice()
Keyfun_slice
:Given a string, returns the substring starting from character index from, and up to character index to. If the to argument is omitted, will output to the end of s. Remember character indices start from zero. Given an array, returns a sub-array from the first index provided up to and including the last index provided. If the to value is omitted, it is understood to be the end of the array. Slice only.
.static org.jvnet.localizer.Localizable
_fun_time_since_unix_epoch_to_date()
Keyfun_time_since_unix_epoch_to_date
:Returns a number converted to a date based on Unix Epoch Time. The number can be Unix Epoch Time in one of the following supported units: second, millisecond, microsecond. Defaults to ''second''.
.static org.jvnet.localizer.Localizable
_fun_to_date()
Keyfun_to_date
:Returns the inputted object converted to a date object. Without arguments, it returns the ISO 8601 extended format. With arguments, you can control the output format. With monthFirst: set false if the date is formatted with the day before the month. With formatN: attempt to parse the date using an ordered list of possible formats. Supply formats based on the SimpleDateFormat syntax: <a href="http://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html">SimpleDateFormat</a>.
.static org.jvnet.localizer.Localizable
_fun_to_number()
Keyfun_to_number
:Returns a string converted to a number. Will attempt to convert other formats into a string, then into a number. If the value is already a number, it will return the number.
.static org.jvnet.localizer.Localizable
_fun_to_string()
Keyfun_to_string
:Takes any value type (string, number, date, boolean, error, null) and gives a string version of that value. You can convert numbers to strings with rounding, using an optional string format. See https://docs.oracle.com/javase/8/docs/api/java/util/Formatter.html. You can also convert dates to strings using date parsing syntax. See https://openrefine.org/docs/manual/grelfunctions/#date-functions.
.static org.jvnet.localizer.Localizable
_fun_type()
Keyfun_type
:Returns a string with the data type of o, such as undefined, string, number, boolean, etc.
.static org.jvnet.localizer.Localizable
_html_inner_html()
Keyhtml_inner_html
:Returns the inner HTML of an HTML element. This will include text and children elements within the element selected. Use it in conjunction with parseHtml() and select() to provide an element.
.static org.jvnet.localizer.Localizable
_html_parse_html()
Keyhtml_parse_html
:Given a cell full of HTML-formatted text, parseHtml() simplifies HTML tags (such as by removing '' /'' at the end of self-closing tags), closes any unclosed tags, and inserts linebreaks and indents for cleaner code. A cell cannot store the output of parseHtml() unless you convert it with toString(): for example, value.parseHtml().toString().
.static org.jvnet.localizer.Localizable
_math_abs()
Keymath_abs
:Returns the absolute value of a number.
.static org.jvnet.localizer.Localizable
_math_acos()
Keymath_acos
:Returns the arc cosine of an angle, in the range 0 through PI.
.static org.jvnet.localizer.Localizable
_math_asin()
Keymath_asin
:Returns the arc sine of an angle in the range of -PI/2 through PI/2.
.static org.jvnet.localizer.Localizable
_math_atan()
Keymath_atan
:Returns the arc tangent of an angle in the range of -PI/2 through PI/2.
.static org.jvnet.localizer.Localizable
_math_atan2()
Keymath_atan2
:Converts rectangular coordinates (n1, n2) to polar (r, theta). Returns number theta.
.static org.jvnet.localizer.Localizable
_math_ceil()
Keymath_ceil
:Returns the ceiling of a number.
.static org.jvnet.localizer.Localizable
_math_combin()
Keymath_combin
:Returns the number of combinations for n2 elements as divided into n1.
.static org.jvnet.localizer.Localizable
_math_cos()
Keymath_cos
:Returns the trigonometric cosine of an angle.
.static org.jvnet.localizer.Localizable
_math_cosh()
Keymath_cosh
:Returns the hyperbolic cosine of a value.
.static org.jvnet.localizer.Localizable
_math_degrees()
Keymath_degrees
:Converts an angle from radians to degrees.
.static org.jvnet.localizer.Localizable
_math_even()
Keymath_even
:Rounds the number up to the nearest even integer.
.static org.jvnet.localizer.Localizable
_math_exp()
Keymath_exp
:Returns e to the power of n.
.static org.jvnet.localizer.Localizable
_math_fact()
Keymath_fact
:Returns the factorial of a number, starting from 1.
.static org.jvnet.localizer.Localizable
_math_factn()
Keymath_factn
:Returns the factorial of n1, starting from n2.
.static org.jvnet.localizer.Localizable
_math_floor()
Keymath_floor
:Returns the floor of a number.
.static org.jvnet.localizer.Localizable
_math_gcd()
Keymath_gcd
:Returns the greatest common denominator of two numbers.
.static org.jvnet.localizer.Localizable
_math_lcm()
Keymath_lcm
:Returns the greatest common denominator of two numbers.
.static org.jvnet.localizer.Localizable
_math_ln()
Keymath_ln
:Returns the natural logarithm of n.
.static org.jvnet.localizer.Localizable
_math_log()
Keymath_log
:Returns the base 10 logarithm of n.
.static org.jvnet.localizer.Localizable
_math_max()
Keymath_max
:Returns the greater of two numbers.
.static org.jvnet.localizer.Localizable
_math_min()
Keymath_min
:Returns the smaller of two numbers.
.static org.jvnet.localizer.Localizable
_math_mod()
Keymath_mod
:Returns n1 modulus n2.
.static org.jvnet.localizer.Localizable
_math_multinomial()
Keymath_multinomial
:Calculates the multinomial of one number or a series of numbers.
.static org.jvnet.localizer.Localizable
_math_odd()
Keymath_odd
:Rounds the number up to the nearest odd integer.
.static org.jvnet.localizer.Localizable
_math_pow()
Keymath_pow
:Returns n1 raised to the power of n2.
.static org.jvnet.localizer.Localizable
_math_quotient()
Keymath_quotient
:Returns the integer portion of a division (truncated, not rounded), when supplied with a numerator and denominator.
.static org.jvnet.localizer.Localizable
_math_radians()
Keymath_radians
:Converts an angle in degrees to radians.
.static org.jvnet.localizer.Localizable
_math_random_number()
Keymath_random_number
:Returns a random integer in the interval between the lower and upper bounds (inclusively). Will output a different random number in each cell in a column.
.static org.jvnet.localizer.Localizable
_math_round()
Keymath_round
:Rounds a number to the nearest integer.
.static org.jvnet.localizer.Localizable
_math_sin()
Keymath_sin
:Returns the trigonometric sine of an angle.
.static org.jvnet.localizer.Localizable
_math_sinh()
Keymath_sinh
:Returns the hyperbolic sine of an angle.
.static org.jvnet.localizer.Localizable
_math_sum()
Keymath_sum
:Return the sum of the numbers in the array. Ignores non-number items. Returns 0 if the array does not contain numbers.
.static org.jvnet.localizer.Localizable
_math_tan()
Keymath_tan
:Returns the trigonometric tangent of an angle.
.static org.jvnet.localizer.Localizable
_math_tanh()
Keymath_tanh
:Returns the hyperbolic tangent of an angle.
.static org.jvnet.localizer.Localizable
_str_chomp()
Keystr_chomp
:Returns a copy of string s with string sep remoed from the end if s ends with sep; otherwies, returns s.
.static org.jvnet.localizer.Localizable
_str_contains()
Keystr_contains
:Returns a boolean indicating whether s contains sub, which is either a substring or a regex pattern. For example, "food".contains("oo") returns true.
.static org.jvnet.localizer.Localizable
_str_decode()
Keystr_decode
:Decodes a string using the specified encoding. Encodings include Base16, Base32Hex, Base32, Base64, and Base64Url.
.static org.jvnet.localizer.Localizable
_str_detect_language()
Keystr_detect_language
:Detects the language of the given string and provides the language code.
.static org.jvnet.localizer.Localizable
_str_diff()
Keystr_diff
:For strings, takes two strings and compares them, returning a string. Returns the remainder of o2 starting with the first character where they differ. For dates, returns the difference in given time units. See the time unit table at https://openrefine.org/docs/manual/grelfunctions/#datepartd-s-timeunit.
.static org.jvnet.localizer.Localizable
_str_encode()
Keystr_encode
:Encodes a string using the specified encoding. Encodings include Base16, Base32Hex, Base32, Base64, and Base64Url.
.static org.jvnet.localizer.Localizable
_str_ends_with()
Keystr_ends_with
:Returns a boolean indicating whether s ends with sub. For example, "food".endsWith("ood") returns true, whereas "food".endsWith("odd") returns false.
.static org.jvnet.localizer.Localizable
_str_escape()
Keystr_escape
:Escapes s in the given escaping mode. The mode can be one of: ''html'', ''xml'', csv'', ''url'', ''javascript''. Note that quotes are required around your mode.
.static org.jvnet.localizer.Localizable
_str_find()
Keystr_find
:Outputs an array of all consecutive substrings inside string s that match the substring or regex pattern p. You can supply a substring by putting it in quotes. See also match().
.static org.jvnet.localizer.Localizable
_str_fingerprint()
Keystr_fingerprint
:Returns the fingerprint of s, a string that is the first step in fingerprint clustering methods: it will trim whitespaces, convert all characters to lowercase, remove punctuation, sort words alphabetically, etc.
.static org.jvnet.localizer.Localizable
_str_index_of()
Keystr_index_of
:Returns the first character index of sub as it first occurs in s; or, returns -1 if s does not contain sub. For example, "internationalization".indexOf("nation") returns 5.
.static org.jvnet.localizer.Localizable
_str_last_index_of()
Keystr_last_index_of
:Returns the first character index of sub as it last occurs in s; or, returns -1 if s does not contain sub. For example, "parallel".lastIndexOf("a") returns 3 (pointing at the second ''a'').
.static org.jvnet.localizer.Localizable
_str_match()
Keystr_match
:Attempts to match the string s in its entirety against the regex pattern p and, if the pattern is found, outputs an array of all capturing groups (found in order). See also find().
.static org.jvnet.localizer.Localizable
_str_md5()
Keystr_md5
:Returns the MD5 hash of an object. If fed something other than a string (array, number, date, etc.), md5() will convert it to a string and deliver the hash of the string.
.static org.jvnet.localizer.Localizable
_str_ngram()
Keystr_ngram
:Returns an array of the word n-grams of s. That is, it lists all the possible consecutive combinations of n words in the string.
.static org.jvnet.localizer.Localizable
_str_ngram_fingerprint()
Keystr_ngram_fingerprint
:Returns the n-gram fingerprint of s.
.static org.jvnet.localizer.Localizable
_str_parse_json()
Keystr_parse_json
:Parses a string as JSON.
.static org.jvnet.localizer.Localizable
_str_parse_uri()
Keystr_parse_uri
:Parses a URI and extracts its components.
.static org.jvnet.localizer.Localizable
_str_partition()
Keystr_partition
:Returns an array of strings [ a, fragment, z ] where a is the substring within s before the first occurrence of fragment, and z is the substring after fragment. Fragment can be a string or a regex. If omitFragment is true, frag is not returned.
.static org.jvnet.localizer.Localizable
_str_phonetic()
Keystr_phonetic
:Returns a phonetic encoding of a string, based on an available phonetic algorithm. Can be one of the following supported phonetic methods: metaphone, doublemetaphone, metaphone3, soundex, cologne. Defaults to ''metaphone3''.
.static org.jvnet.localizer.Localizable
_str_range()
Keystr_range
:Returns an array where a and b are the start and the end of the range respectively and c is the step (increment).
.static org.jvnet.localizer.Localizable
_str_reinterpret()
Keystr_reinterpret
:Returns s reinterpreted through the given character encoders. You must supply one of the supported encodings for each of the original source and the target output: https://docs.oracle.com/javase/1.5.0/docs/guide/intl/encoding.doc.html. Note that quotes are required around character encoders.
.static org.jvnet.localizer.Localizable
_str_replace()
Keystr_replace
:Returns the string obtained by replacing the find string with the replace string in the inputted string. For example, ''The cow jumps over the moon and moos''.replace(''oo'', ''ee'') returns the string ''The cow jumps over the meen and mees''. Find can be a regex pattern. For example, ''The cow jumps over the moon and moos''.replace(/\s+/, "_") will return ''The_cow_jumps_over_the_moon_and_moos''
.static org.jvnet.localizer.Localizable
_str_replace_chars()
Keystr_replace_chars
:Returns the string obtained by replacing a character in s, identified by find, with the corresponding character identified in replace. You cannot use this to replace a single character with more than one character.
.static org.jvnet.localizer.Localizable
_str_replace_each()
Keystr_replace_each
:Replace each occurrence of a substring in a string with another substring.
.static org.jvnet.localizer.Localizable
_str_rpartition()
Keystr_rpartition
:Returns an array of strings [ a, fragment, z ] where a is the substring within s before the last occurrence of fragment, and z is the substring after the last instance of fragment. If omitFragment is true, frag is not returned.
.static org.jvnet.localizer.Localizable
_str_sha1()
Keystr_sha1
:Returns the SHA-1 hash of an object. If fed something other than a string (array, number, date, etc.), sha1() will convert it to a string and deliver the hash of the string.
.static org.jvnet.localizer.Localizable
_str_smart_split()
Keystr_smart_split
:Returns the array of strings obtained by splitting s by sep, or by guessing either tab or comma separation if there is no sep given. Handles quotes properly and understands cancelled characters. The separator can be either a string or a regex pattern.
.static org.jvnet.localizer.Localizable
_str_split()
Keystr_split
:Returns the array of strings obtained by splitting s by sep. The separator can be either a string or a regex pattern. If preserveTokens is true, empty segments are preserved.
.static org.jvnet.localizer.Localizable
_str_split_by_char_type()
Keystr_split_by_char_type
:Returns an array of strings obtained by splitting s into groups of consecutive characters each time the characters change Unicode categories.
.static org.jvnet.localizer.Localizable
_str_split_by_lengths()
Keystr_split_by_lengths
:Returns the array of strings obtained by splitting s into substrings with the given lengths. For example, "internationalization".splitByLengths(5, 6, 3) returns an array of 3 strings: [ "inter", "nation", "ali" ]. Excess characters are discarded from the output array.
.static org.jvnet.localizer.Localizable
_str_starts_with()
Keystr_starts_with
:Returns a boolean indicating whether s starts with sub. For example, "food".startsWith("foo") returns true, whereas "food".startsWith("bar") returns false.
.static org.jvnet.localizer.Localizable
_str_to_lowercase()
Keystr_to_lowercase
:Returns string s converted to all lowercase characters.
.static org.jvnet.localizer.Localizable
_str_to_title_case()
Keystr_to_title_case
:Returns string s converted into titlecase: a capital letter starting each word, and the rest of the letters lowercase. For example, ''Once upon a midnight DREARY''.toTitlecase() returns the string ''Once Upon A Midnight Dreary''.
.static org.jvnet.localizer.Localizable
_str_to_uppercase()
Keystr_to_uppercase
:Returns string s converted to all uppercase characters.
.static org.jvnet.localizer.Localizable
_str_trim()
Keystr_trim
:Returns a copy of string s with leading and trailing whitespace removed.
.static org.jvnet.localizer.Localizable
_str_unescape()
Keystr_unescape
:Unescapes s in the given escaping mode. The mode can be one of: ''html'', ''xml'', ''csv'', ''url'', ''javascript''. Note that quotes are required around your mode.
.static org.jvnet.localizer.Localizable
_str_unicode()
Keystr_unicode
:Returns an array of strings describing each character of s in their full unicode notation.
.static org.jvnet.localizer.Localizable
_str_unicode_type()
Keystr_unicode_type
:Returns an array of strings describing each character of s by their unicode type.
.static org.jvnet.localizer.Localizable
_xml_innerxml()
Keyxml_innerxml
:Returns the inner XML elements of an XML element. Does not return the text directly inside your chosen XML element - only the contents of its children. Use it in conjunction with parseXml() and select() to provide an element.
.static org.jvnet.localizer.Localizable
_xml_owntext()
Keyxml_owntext
:Returns the text directly inside the selected XML or HTML element only, ignoring text inside children elements (for this, use innerXml()). Use it in conjunction with a parser and select() to provide an element.
.static org.jvnet.localizer.Localizable
_xml_parent()
Keyxml_parent
:Returns the parent node or null if no parent. Use it in conjunction with parseHtml() and select() to provide an element.
.static org.jvnet.localizer.Localizable
_xml_parsexml()
Keyxml_parsexml
:Given a cell full of XML-formatted text, parseXml() returns a full XML document and adds any missing closing tags.
.static org.jvnet.localizer.Localizable
_xml_scripttext()
Keyxml_scripttext
:Returns the combined data of an HTML/XML Element. Data is e.g. the inside of a <script> tag. Note that data is NOT the text of the element. Use htmlText() to get the text that would be visible to a user, and scriptText() for the contents of <script>, <style>, etc. Use scriptText() in conjunction with parseHtml() and select().
.static org.jvnet.localizer.Localizable
_xml_selectxml()
Keyxml_selectxml
:Returns an array of all the desired elements from an HTML or XML document, if the element exists. Elements are identified using the Jsoup selector syntax: https://jsoup.org/apidocs/org/jsoup/select/Selector.html.
.static org.jvnet.localizer.Localizable
_xml_wholetext()
Keyxml_wholetext
:Selects the (unencoded) text of an element and its children, including any new lines and spaces, and returns a string of unencoded, un-normalized text. Use it in conjunction with parseHtml() and select() to provide an element.
.static org.jvnet.localizer.Localizable
_xml_xmlattr()
Keyxml_xmlattr
:Returns a string from an attribute on an XML or HTML element. Use it in conjunction with parseHtml() or parseXml() to point to an element first.
.static org.jvnet.localizer.Localizable
_xml_xmltext()
Keyxml_xmltext
:Returns a string of the text from within an HTML or XML element (including all child elements), removing tags and line breaks inside the string. Use it in conjunction with parseHtml() or parseXml() and select() to provide an element.
.static String
arr_args_to_array()
Keyarr_args_to_array
:Returns all arguments passed to it as an array
.static String
arr_in_array()
Keyarr_in_array
:Returns true if the array contains the desired string, and false otherwise. Will not convert data types.
.static String
arr_join()
Keyarr_join
:Joins the items in the array with sep, and returns it all as a string.
.static String
arr_reverse()
Keyarr_reverse
:Reverses array a.
.static String
arr_sort()
Keyarr_sort
:Sorts the array in ascending order. Sorting is case-sensitive, uppercase first and lowercase second.
.static String
arr_uniques()
Keyarr_uniques
:Returns the array with duplicates removed. Case-sensitive.
.static String
bool_and()
Keybool_and
:Uses the logical operator AND on two or more booleans to output a boolean. Evaluates multiple statements into booleans, then returns true if all the statements are true. For example, (1 < 3).and(1 < 0) returns false because one condition is true and one is false.
.static String
bool_not()
Keybool_not
:Uses the logical operator NOT on a boolean to output a boolean. For example, not(1 > 7) returns true because 1 > 7 itself is false.
.static String
bool_or()
Keybool_or
:Uses the logical operator OR on two or more booleans to output a boolean. For example, (1 < 3).or(1 > 7) returns true because at least one of the conditions (the first one) is true.
.static String
bool_xor()
Keybool_xor
:Uses the logical operator XOR (exclusive-or) on two or more booleans to output a boolean. Evaluates multiple statements, then returns true if only one of them is true. For example, (1 < 3).xor(1 < 7) returns false because more than one of the conditions is true.
.static String
date_inc()
Keydate_inc
:Returns a date changed by the given amount in the given unit of time, in quotes. See https://openrefine.org/docs/manual/grelfunctions/#incd-n-s-timeunit for a table. The default unit is ''hour''. A positive value increases the date, and a negative value moves it back in time.
.static String
date_now()
Keydate_now
:Returns the current time according to your system clock, in the ISO 8601 extended format (converted to UTC). For example, 10:53am (and 00 seconds) on November 26th 2020 in EST returns [date 2020-11-26T15:53:00Z].
.static String
date_part()
Keydate_part
:Returns part of a date. The data type returned depends on the unit. See https://openrefine.org/docs/manual/grelfunctions/#datepartd-s-timeunit, https://openrefine.org/docs/manual/grelfunctions#date-functions for a table.
.static String
fun_coalesce()
Keyfun_coalesce
:Returns the first non-null from a series of objects (meaning any data type - string, date, number, boolean, etc.).
.static String
fun_cross()
Keyfun_cross
:Looks up the given value in the target column of the target project, returns an array of matched rows. Two values match if and only if they have the same string representation. The first argument will be interpreted as cell.value if set to cell. The second argument will be interpreted as the current project name if omitted or set to "". The third argument will be interpreted as the index (starts from 0) column if omitted or set to "".
.static String
fun_facet_count()
Keyfun_facet_count
:Returns the facet count corresponding to the given choice value, by looking for the facetExpression in the choiceValue in columnName.
.static String
fun_get()
Keyfun_get
:If o has named fields, returns the field named ''from'' of o. If o is an array, returns a sub-array o[from, to]. if o is a string, returns o.substring(from, to).
.static String
fun_has_field()
Keyfun_has_field
:Returns a boolean indicating whether o has a member field called name.
.static String
fun_jsonize()
Keyfun_jsonize
:Quotes a value as a JSON literal value.
.static String
fun_length()
Keyfun_length
:Returns the length of string s as a number, or the size of array a, meaning the number of objects inside it. Arrays can be empty, in which case length() will return 0.
.static String
fun_slice()
Keyfun_slice
:Given a string, returns the substring starting from character index from, and up to character index to. If the to argument is omitted, will output to the end of s. Remember character indices start from zero. Given an array, returns a sub-array from the first index provided up to and including the last index provided. If the to value is omitted, it is understood to be the end of the array. Slice only.
.static String
fun_time_since_unix_epoch_to_date()
Keyfun_time_since_unix_epoch_to_date
:Returns a number converted to a date based on Unix Epoch Time. The number can be Unix Epoch Time in one of the following supported units: second, millisecond, microsecond. Defaults to ''second''.
.static String
fun_to_date()
Keyfun_to_date
:Returns the inputted object converted to a date object. Without arguments, it returns the ISO 8601 extended format. With arguments, you can control the output format. With monthFirst: set false if the date is formatted with the day before the month. With formatN: attempt to parse the date using an ordered list of possible formats. Supply formats based on the SimpleDateFormat syntax: <a href="http://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html">SimpleDateFormat</a>.
.static String
fun_to_number()
Keyfun_to_number
:Returns a string converted to a number. Will attempt to convert other formats into a string, then into a number. If the value is already a number, it will return the number.
.static String
fun_to_string()
Keyfun_to_string
:Takes any value type (string, number, date, boolean, error, null) and gives a string version of that value. You can convert numbers to strings with rounding, using an optional string format. See https://docs.oracle.com/javase/8/docs/api/java/util/Formatter.html. You can also convert dates to strings using date parsing syntax. See https://openrefine.org/docs/manual/grelfunctions/#date-functions.
.static String
fun_type()
Keyfun_type
:Returns a string with the data type of o, such as undefined, string, number, boolean, etc.
.static String
html_inner_html()
Keyhtml_inner_html
:Returns the inner HTML of an HTML element. This will include text and children elements within the element selected. Use it in conjunction with parseHtml() and select() to provide an element.
.static String
html_parse_html()
Keyhtml_parse_html
:Given a cell full of HTML-formatted text, parseHtml() simplifies HTML tags (such as by removing '' /'' at the end of self-closing tags), closes any unclosed tags, and inserts linebreaks and indents for cleaner code. A cell cannot store the output of parseHtml() unless you convert it with toString(): for example, value.parseHtml().toString().
.static String
math_abs()
Keymath_abs
:Returns the absolute value of a number.
.static String
math_acos()
Keymath_acos
:Returns the arc cosine of an angle, in the range 0 through PI.
.static String
math_asin()
Keymath_asin
:Returns the arc sine of an angle in the range of -PI/2 through PI/2.
.static String
math_atan()
Keymath_atan
:Returns the arc tangent of an angle in the range of -PI/2 through PI/2.
.static String
math_atan2()
Keymath_atan2
:Converts rectangular coordinates (n1, n2) to polar (r, theta). Returns number theta.
.static String
math_ceil()
Keymath_ceil
:Returns the ceiling of a number.
.static String
math_combin()
Keymath_combin
:Returns the number of combinations for n2 elements as divided into n1.
.static String
math_cos()
Keymath_cos
:Returns the trigonometric cosine of an angle.
.static String
math_cosh()
Keymath_cosh
:Returns the hyperbolic cosine of a value.
.static String
math_degrees()
Keymath_degrees
:Converts an angle from radians to degrees.
.static String
math_even()
Keymath_even
:Rounds the number up to the nearest even integer.
.static String
math_exp()
Keymath_exp
:Returns e to the power of n.
.static String
math_fact()
Keymath_fact
:Returns the factorial of a number, starting from 1.
.static String
math_factn()
Keymath_factn
:Returns the factorial of n1, starting from n2.
.static String
math_floor()
Keymath_floor
:Returns the floor of a number.
.static String
math_gcd()
Keymath_gcd
:Returns the greatest common denominator of two numbers.
.static String
math_lcm()
Keymath_lcm
:Returns the greatest common denominator of two numbers.
.static String
math_ln()
Keymath_ln
:Returns the natural logarithm of n.
.static String
math_log()
Keymath_log
:Returns the base 10 logarithm of n.
.static String
math_max()
Keymath_max
:Returns the greater of two numbers.
.static String
math_min()
Keymath_min
:Returns the smaller of two numbers.
.static String
math_mod()
Keymath_mod
:Returns n1 modulus n2.
.static String
math_multinomial()
Keymath_multinomial
:Calculates the multinomial of one number or a series of numbers.
.static String
math_odd()
Keymath_odd
:Rounds the number up to the nearest odd integer.
.static String
math_pow()
Keymath_pow
:Returns n1 raised to the power of n2.
.static String
math_quotient()
Keymath_quotient
:Returns the integer portion of a division (truncated, not rounded), when supplied with a numerator and denominator.
.static String
math_radians()
Keymath_radians
:Converts an angle in degrees to radians.
.static String
math_random_number()
Keymath_random_number
:Returns a random integer in the interval between the lower and upper bounds (inclusively). Will output a different random number in each cell in a column.
.static String
math_round()
Keymath_round
:Rounds a number to the nearest integer.
.static String
math_sin()
Keymath_sin
:Returns the trigonometric sine of an angle.
.static String
math_sinh()
Keymath_sinh
:Returns the hyperbolic sine of an angle.
.static String
math_sum()
Keymath_sum
:Return the sum of the numbers in the array. Ignores non-number items. Returns 0 if the array does not contain numbers.
.static String
math_tan()
Keymath_tan
:Returns the trigonometric tangent of an angle.
.static String
math_tanh()
Keymath_tanh
:Returns the hyperbolic tangent of an angle.
.static String
str_chomp()
Keystr_chomp
:Returns a copy of string s with string sep remoed from the end if s ends with sep; otherwies, returns s.
.static String
str_contains()
Keystr_contains
:Returns a boolean indicating whether s contains sub, which is either a substring or a regex pattern. For example, "food".contains("oo") returns true.
.static String
str_decode()
Keystr_decode
:Decodes a string using the specified encoding. Encodings include Base16, Base32Hex, Base32, Base64, and Base64Url.
.static String
str_detect_language()
Keystr_detect_language
:Detects the language of the given string and provides the language code.
.static String
str_diff()
Keystr_diff
:For strings, takes two strings and compares them, returning a string. Returns the remainder of o2 starting with the first character where they differ. For dates, returns the difference in given time units. See the time unit table at https://openrefine.org/docs/manual/grelfunctions/#datepartd-s-timeunit.
.static String
str_encode()
Keystr_encode
:Encodes a string using the specified encoding. Encodings include Base16, Base32Hex, Base32, Base64, and Base64Url.
.static String
str_ends_with()
Keystr_ends_with
:Returns a boolean indicating whether s ends with sub. For example, "food".endsWith("ood") returns true, whereas "food".endsWith("odd") returns false.
.static String
str_escape()
Keystr_escape
:Escapes s in the given escaping mode. The mode can be one of: ''html'', ''xml'', csv'', ''url'', ''javascript''. Note that quotes are required around your mode.
.static String
str_find()
Keystr_find
:Outputs an array of all consecutive substrings inside string s that match the substring or regex pattern p. You can supply a substring by putting it in quotes. See also match().
.static String
str_fingerprint()
Keystr_fingerprint
:Returns the fingerprint of s, a string that is the first step in fingerprint clustering methods: it will trim whitespaces, convert all characters to lowercase, remove punctuation, sort words alphabetically, etc.
.static String
str_index_of()
Keystr_index_of
:Returns the first character index of sub as it first occurs in s; or, returns -1 if s does not contain sub. For example, "internationalization".indexOf("nation") returns 5.
.static String
str_last_index_of()
Keystr_last_index_of
:Returns the first character index of sub as it last occurs in s; or, returns -1 if s does not contain sub. For example, "parallel".lastIndexOf("a") returns 3 (pointing at the second ''a'').
.static String
str_match()
Keystr_match
:Attempts to match the string s in its entirety against the regex pattern p and, if the pattern is found, outputs an array of all capturing groups (found in order). See also find().
.static String
str_md5()
Keystr_md5
:Returns the MD5 hash of an object. If fed something other than a string (array, number, date, etc.), md5() will convert it to a string and deliver the hash of the string.
.static String
str_ngram()
Keystr_ngram
:Returns an array of the word n-grams of s. That is, it lists all the possible consecutive combinations of n words in the string.
.static String
str_ngram_fingerprint()
Keystr_ngram_fingerprint
:Returns the n-gram fingerprint of s.
.static String
str_parse_json()
Keystr_parse_json
:Parses a string as JSON.
.static String
str_parse_uri()
Keystr_parse_uri
:Parses a URI and extracts its components.
.static String
str_partition()
Keystr_partition
:Returns an array of strings [ a, fragment, z ] where a is the substring within s before the first occurrence of fragment, and z is the substring after fragment. Fragment can be a string or a regex. If omitFragment is true, frag is not returned.
.static String
str_phonetic()
Keystr_phonetic
:Returns a phonetic encoding of a string, based on an available phonetic algorithm. Can be one of the following supported phonetic methods: metaphone, doublemetaphone, metaphone3, soundex, cologne. Defaults to ''metaphone3''.
.static String
str_range()
Keystr_range
:Returns an array where a and b are the start and the end of the range respectively and c is the step (increment).
.static String
str_reinterpret()
Keystr_reinterpret
:Returns s reinterpreted through the given character encoders. You must supply one of the supported encodings for each of the original source and the target output: https://docs.oracle.com/javase/1.5.0/docs/guide/intl/encoding.doc.html. Note that quotes are required around character encoders.
.static String
str_replace()
Keystr_replace
:Returns the string obtained by replacing the find string with the replace string in the inputted string. For example, ''The cow jumps over the moon and moos''.replace(''oo'', ''ee'') returns the string ''The cow jumps over the meen and mees''. Find can be a regex pattern. For example, ''The cow jumps over the moon and moos''.replace(/\s+/, "_") will return ''The_cow_jumps_over_the_moon_and_moos''
.static String
str_replace_chars()
Keystr_replace_chars
:Returns the string obtained by replacing a character in s, identified by find, with the corresponding character identified in replace. You cannot use this to replace a single character with more than one character.
.static String
str_replace_each()
Keystr_replace_each
:Replace each occurrence of a substring in a string with another substring.
.static String
str_rpartition()
Keystr_rpartition
:Returns an array of strings [ a, fragment, z ] where a is the substring within s before the last occurrence of fragment, and z is the substring after the last instance of fragment. If omitFragment is true, frag is not returned.
.static String
str_sha1()
Keystr_sha1
:Returns the SHA-1 hash of an object. If fed something other than a string (array, number, date, etc.), sha1() will convert it to a string and deliver the hash of the string.
.static String
str_smart_split()
Keystr_smart_split
:Returns the array of strings obtained by splitting s by sep, or by guessing either tab or comma separation if there is no sep given. Handles quotes properly and understands cancelled characters. The separator can be either a string or a regex pattern.
.static String
str_split()
Keystr_split
:Returns the array of strings obtained by splitting s by sep. The separator can be either a string or a regex pattern. If preserveTokens is true, empty segments are preserved.
.static String
str_split_by_char_type()
Keystr_split_by_char_type
:Returns an array of strings obtained by splitting s into groups of consecutive characters each time the characters change Unicode categories.
.static String
str_split_by_lengths()
Keystr_split_by_lengths
:Returns the array of strings obtained by splitting s into substrings with the given lengths. For example, "internationalization".splitByLengths(5, 6, 3) returns an array of 3 strings: [ "inter", "nation", "ali" ]. Excess characters are discarded from the output array.
.static String
str_starts_with()
Keystr_starts_with
:Returns a boolean indicating whether s starts with sub. For example, "food".startsWith("foo") returns true, whereas "food".startsWith("bar") returns false.
.static String
str_to_lowercase()
Keystr_to_lowercase
:Returns string s converted to all lowercase characters.
.static String
str_to_title_case()
Keystr_to_title_case
:Returns string s converted into titlecase: a capital letter starting each word, and the rest of the letters lowercase. For example, ''Once upon a midnight DREARY''.toTitlecase() returns the string ''Once Upon A Midnight Dreary''.
.static String
str_to_uppercase()
Keystr_to_uppercase
:Returns string s converted to all uppercase characters.
.static String
str_trim()
Keystr_trim
:Returns a copy of string s with leading and trailing whitespace removed.
.static String
str_unescape()
Keystr_unescape
:Unescapes s in the given escaping mode. The mode can be one of: ''html'', ''xml'', ''csv'', ''url'', ''javascript''. Note that quotes are required around your mode.
.static String
str_unicode()
Keystr_unicode
:Returns an array of strings describing each character of s in their full unicode notation.
.static String
str_unicode_type()
Keystr_unicode_type
:Returns an array of strings describing each character of s by their unicode type.
.static String
xml_innerxml()
Keyxml_innerxml
:Returns the inner XML elements of an XML element. Does not return the text directly inside your chosen XML element - only the contents of its children. Use it in conjunction with parseXml() and select() to provide an element.
.static String
xml_owntext()
Keyxml_owntext
:Returns the text directly inside the selected XML or HTML element only, ignoring text inside children elements (for this, use innerXml()). Use it in conjunction with a parser and select() to provide an element.
.static String
xml_parent()
Keyxml_parent
:Returns the parent node or null if no parent. Use it in conjunction with parseHtml() and select() to provide an element.
.static String
xml_parsexml()
Keyxml_parsexml
:Given a cell full of XML-formatted text, parseXml() returns a full XML document and adds any missing closing tags.
.static String
xml_scripttext()
Keyxml_scripttext
:Returns the combined data of an HTML/XML Element. Data is e.g. the inside of a <script> tag. Note that data is NOT the text of the element. Use htmlText() to get the text that would be visible to a user, and scriptText() for the contents of <script>, <style>, etc. Use scriptText() in conjunction with parseHtml() and select().
.static String
xml_selectxml()
Keyxml_selectxml
:Returns an array of all the desired elements from an HTML or XML document, if the element exists. Elements are identified using the Jsoup selector syntax: https://jsoup.org/apidocs/org/jsoup/select/Selector.html.
.static String
xml_wholetext()
Keyxml_wholetext
:Selects the (unencoded) text of an element and its children, including any new lines and spaces, and returns a string of unencoded, un-normalized text. Use it in conjunction with parseHtml() and select() to provide an element.
.static String
xml_xmlattr()
Keyxml_xmlattr
:Returns a string from an attribute on an XML or HTML element. Use it in conjunction with parseHtml() or parseXml() to point to an element first.
.static String
xml_xmltext()
Keyxml_xmltext
:Returns a string of the text from within an HTML or XML element (including all child elements), removing tags and line breaks inside the string. Use it in conjunction with parseHtml() or parseXml() and select() to provide an element.
.
-
-
-
Method Detail
-
str_trim
public static String str_trim()
Keystr_trim
:Returns a copy of string s with leading and trailing whitespace removed.
.- Returns:
Returns a copy of string s with leading and trailing whitespace removed.
-
_str_trim
public static org.jvnet.localizer.Localizable _str_trim()
Keystr_trim
:Returns a copy of string s with leading and trailing whitespace removed.
.- Returns:
Returns a copy of string s with leading and trailing whitespace removed.
-
math_asin
public static String math_asin()
Keymath_asin
:Returns the arc sine of an angle in the range of -PI/2 through PI/2.
.- Returns:
Returns the arc sine of an angle in the range of -PI/2 through PI/2.
-
_math_asin
public static org.jvnet.localizer.Localizable _math_asin()
Keymath_asin
:Returns the arc sine of an angle in the range of -PI/2 through PI/2.
.- Returns:
Returns the arc sine of an angle in the range of -PI/2 through PI/2.
-
html_parse_html
public static String html_parse_html()
Keyhtml_parse_html
:Given a cell full of HTML-formatted text, parseHtml() simplifies HTML tags (such as by removing '' /'' at the end of self-closing tags), closes any unclosed tags, and inserts linebreaks and indents for cleaner code. A cell cannot store the output of parseHtml() unless you convert it with toString(): for example, value.parseHtml().toString().
.- Returns:
Given a cell full of HTML-formatted text, parseHtml() simplifies HTML tags (such as by removing '' /'' at the end of self-closing tags), closes any unclosed tags, and inserts linebreaks and indents for cleaner code. A cell cannot store the output of parseHtml() unless you convert it with toString(): for example, value.parseHtml().toString().
-
_html_parse_html
public static org.jvnet.localizer.Localizable _html_parse_html()
Keyhtml_parse_html
:Given a cell full of HTML-formatted text, parseHtml() simplifies HTML tags (such as by removing '' /'' at the end of self-closing tags), closes any unclosed tags, and inserts linebreaks and indents for cleaner code. A cell cannot store the output of parseHtml() unless you convert it with toString(): for example, value.parseHtml().toString().
.- Returns:
Given a cell full of HTML-formatted text, parseHtml() simplifies HTML tags (such as by removing '' /'' at the end of self-closing tags), closes any unclosed tags, and inserts linebreaks and indents for cleaner code. A cell cannot store the output of parseHtml() unless you convert it with toString(): for example, value.parseHtml().toString().
-
bool_xor
public static String bool_xor()
Keybool_xor
:Uses the logical operator XOR (exclusive-or) on two or more booleans to output a boolean. Evaluates multiple statements, then returns true if only one of them is true. For example, (1 < 3).xor(1 < 7) returns false because more than one of the conditions is true.
.- Returns:
Uses the logical operator XOR (exclusive-or) on two or more booleans to output a boolean. Evaluates multiple statements, then returns true if only one of them is true. For example, (1 < 3).xor(1 < 7) returns false because more than one of the conditions is true.
-
_bool_xor
public static org.jvnet.localizer.Localizable _bool_xor()
Keybool_xor
:Uses the logical operator XOR (exclusive-or) on two or more booleans to output a boolean. Evaluates multiple statements, then returns true if only one of them is true. For example, (1 < 3).xor(1 < 7) returns false because more than one of the conditions is true.
.- Returns:
Uses the logical operator XOR (exclusive-or) on two or more booleans to output a boolean. Evaluates multiple statements, then returns true if only one of them is true. For example, (1 < 3).xor(1 < 7) returns false because more than one of the conditions is true.
-
fun_get
public static String fun_get()
Keyfun_get
:If o has named fields, returns the field named ''from'' of o. If o is an array, returns a sub-array o[from, to]. if o is a string, returns o.substring(from, to).
.- Returns:
If o has named fields, returns the field named ''from'' of o. If o is an array, returns a sub-array o[from, to]. if o is a string, returns o.substring(from, to).
-
_fun_get
public static org.jvnet.localizer.Localizable _fun_get()
Keyfun_get
:If o has named fields, returns the field named ''from'' of o. If o is an array, returns a sub-array o[from, to]. if o is a string, returns o.substring(from, to).
.- Returns:
If o has named fields, returns the field named ''from'' of o. If o is an array, returns a sub-array o[from, to]. if o is a string, returns o.substring(from, to).
-
str_reinterpret
public static String str_reinterpret()
Keystr_reinterpret
:Returns s reinterpreted through the given character encoders. You must supply one of the supported encodings for each of the original source and the target output: https://docs.oracle.com/javase/1.5.0/docs/guide/intl/encoding.doc.html. Note that quotes are required around character encoders.
.- Returns:
Returns s reinterpreted through the given character encoders. You must supply one of the supported encodings for each of the original source and the target output: https://docs.oracle.com/javase/1.5.0/docs/guide/intl/encoding.doc.html. Note that quotes are required around character encoders.
-
_str_reinterpret
public static org.jvnet.localizer.Localizable _str_reinterpret()
Keystr_reinterpret
:Returns s reinterpreted through the given character encoders. You must supply one of the supported encodings for each of the original source and the target output: https://docs.oracle.com/javase/1.5.0/docs/guide/intl/encoding.doc.html. Note that quotes are required around character encoders.
.- Returns:
Returns s reinterpreted through the given character encoders. You must supply one of the supported encodings for each of the original source and the target output: https://docs.oracle.com/javase/1.5.0/docs/guide/intl/encoding.doc.html. Note that quotes are required around character encoders.
-
math_tanh
public static String math_tanh()
Keymath_tanh
:Returns the hyperbolic tangent of an angle.
.- Returns:
Returns the hyperbolic tangent of an angle.
-
_math_tanh
public static org.jvnet.localizer.Localizable _math_tanh()
Keymath_tanh
:Returns the hyperbolic tangent of an angle.
.- Returns:
Returns the hyperbolic tangent of an angle.
-
str_unicode_type
public static String str_unicode_type()
Keystr_unicode_type
:Returns an array of strings describing each character of s by their unicode type.
.- Returns:
Returns an array of strings describing each character of s by their unicode type.
-
_str_unicode_type
public static org.jvnet.localizer.Localizable _str_unicode_type()
Keystr_unicode_type
:Returns an array of strings describing each character of s by their unicode type.
.- Returns:
Returns an array of strings describing each character of s by their unicode type.
-
math_tan
public static String math_tan()
Keymath_tan
:Returns the trigonometric tangent of an angle.
.- Returns:
Returns the trigonometric tangent of an angle.
-
_math_tan
public static org.jvnet.localizer.Localizable _math_tan()
Keymath_tan
:Returns the trigonometric tangent of an angle.
.- Returns:
Returns the trigonometric tangent of an angle.
-
str_sha1
public static String str_sha1()
Keystr_sha1
:Returns the SHA-1 hash of an object. If fed something other than a string (array, number, date, etc.), sha1() will convert it to a string and deliver the hash of the string.
.- Returns:
Returns the SHA-1 hash of an object. If fed something other than a string (array, number, date, etc.), sha1() will convert it to a string and deliver the hash of the string.
-
_str_sha1
public static org.jvnet.localizer.Localizable _str_sha1()
Keystr_sha1
:Returns the SHA-1 hash of an object. If fed something other than a string (array, number, date, etc.), sha1() will convert it to a string and deliver the hash of the string.
.- Returns:
Returns the SHA-1 hash of an object. If fed something other than a string (array, number, date, etc.), sha1() will convert it to a string and deliver the hash of the string.
-
math_factn
public static String math_factn()
Keymath_factn
:Returns the factorial of n1, starting from n2.
.- Returns:
Returns the factorial of n1, starting from n2.
-
_math_factn
public static org.jvnet.localizer.Localizable _math_factn()
Keymath_factn
:Returns the factorial of n1, starting from n2.
.- Returns:
Returns the factorial of n1, starting from n2.
-
math_cos
public static String math_cos()
Keymath_cos
:Returns the trigonometric cosine of an angle.
.- Returns:
Returns the trigonometric cosine of an angle.
-
_math_cos
public static org.jvnet.localizer.Localizable _math_cos()
Keymath_cos
:Returns the trigonometric cosine of an angle.
.- Returns:
Returns the trigonometric cosine of an angle.
-
fun_jsonize
public static String fun_jsonize()
Keyfun_jsonize
:Quotes a value as a JSON literal value.
.- Returns:
Quotes a value as a JSON literal value.
-
_fun_jsonize
public static org.jvnet.localizer.Localizable _fun_jsonize()
Keyfun_jsonize
:Quotes a value as a JSON literal value.
.- Returns:
Quotes a value as a JSON literal value.
-
date_now
public static String date_now()
Keydate_now
:Returns the current time according to your system clock, in the ISO 8601 extended format (converted to UTC). For example, 10:53am (and 00 seconds) on November 26th 2020 in EST returns [date 2020-11-26T15:53:00Z].
.- Returns:
Returns the current time according to your system clock, in the ISO 8601 extended format (converted to UTC). For example, 10:53am (and 00 seconds) on November 26th 2020 in EST returns [date 2020-11-26T15:53:00Z].
-
_date_now
public static org.jvnet.localizer.Localizable _date_now()
Keydate_now
:Returns the current time according to your system clock, in the ISO 8601 extended format (converted to UTC). For example, 10:53am (and 00 seconds) on November 26th 2020 in EST returns [date 2020-11-26T15:53:00Z].
.- Returns:
Returns the current time according to your system clock, in the ISO 8601 extended format (converted to UTC). For example, 10:53am (and 00 seconds) on November 26th 2020 in EST returns [date 2020-11-26T15:53:00Z].
-
date_inc
public static String date_inc()
Keydate_inc
:Returns a date changed by the given amount in the given unit of time, in quotes. See https://openrefine.org/docs/manual/grelfunctions/#incd-n-s-timeunit for a table. The default unit is ''hour''. A positive value increases the date, and a negative value moves it back in time.
.- Returns:
Returns a date changed by the given amount in the given unit of time, in quotes. See https://openrefine.org/docs/manual/grelfunctions/#incd-n-s-timeunit for a table. The default unit is ''hour''. A positive value increases the date, and a negative value moves it back in time.
-
_date_inc
public static org.jvnet.localizer.Localizable _date_inc()
Keydate_inc
:Returns a date changed by the given amount in the given unit of time, in quotes. See https://openrefine.org/docs/manual/grelfunctions/#incd-n-s-timeunit for a table. The default unit is ''hour''. A positive value increases the date, and a negative value moves it back in time.
.- Returns:
Returns a date changed by the given amount in the given unit of time, in quotes. See https://openrefine.org/docs/manual/grelfunctions/#incd-n-s-timeunit for a table. The default unit is ''hour''. A positive value increases the date, and a negative value moves it back in time.
-
str_split_by_lengths
public static String str_split_by_lengths()
Keystr_split_by_lengths
:Returns the array of strings obtained by splitting s into substrings with the given lengths. For example, "internationalization".splitByLengths(5, 6, 3) returns an array of 3 strings: [ "inter", "nation", "ali" ]. Excess characters are discarded from the output array.
.- Returns:
Returns the array of strings obtained by splitting s into substrings with the given lengths. For example, "internationalization".splitByLengths(5, 6, 3) returns an array of 3 strings: [ "inter", "nation", "ali" ]. Excess characters are discarded from the output array.
-
_str_split_by_lengths
public static org.jvnet.localizer.Localizable _str_split_by_lengths()
Keystr_split_by_lengths
:Returns the array of strings obtained by splitting s into substrings with the given lengths. For example, "internationalization".splitByLengths(5, 6, 3) returns an array of 3 strings: [ "inter", "nation", "ali" ]. Excess characters are discarded from the output array.
.- Returns:
Returns the array of strings obtained by splitting s into substrings with the given lengths. For example, "internationalization".splitByLengths(5, 6, 3) returns an array of 3 strings: [ "inter", "nation", "ali" ]. Excess characters are discarded from the output array.
-
str_replace_each
public static String str_replace_each()
Keystr_replace_each
:Replace each occurrence of a substring in a string with another substring.
.- Returns:
Replace each occurrence of a substring in a string with another substring.
-
_str_replace_each
public static org.jvnet.localizer.Localizable _str_replace_each()
Keystr_replace_each
:Replace each occurrence of a substring in a string with another substring.
.- Returns:
Replace each occurrence of a substring in a string with another substring.
-
math_cosh
public static String math_cosh()
Keymath_cosh
:Returns the hyperbolic cosine of a value.
.- Returns:
Returns the hyperbolic cosine of a value.
-
_math_cosh
public static org.jvnet.localizer.Localizable _math_cosh()
Keymath_cosh
:Returns the hyperbolic cosine of a value.
.- Returns:
Returns the hyperbolic cosine of a value.
-
str_chomp
public static String str_chomp()
Keystr_chomp
:Returns a copy of string s with string sep remoed from the end if s ends with sep; otherwies, returns s.
.- Returns:
Returns a copy of string s with string sep remoed from the end if s ends with sep; otherwies, returns s.
-
_str_chomp
public static org.jvnet.localizer.Localizable _str_chomp()
Keystr_chomp
:Returns a copy of string s with string sep remoed from the end if s ends with sep; otherwies, returns s.
.- Returns:
Returns a copy of string s with string sep remoed from the end if s ends with sep; otherwies, returns s.
-
fun_has_field
public static String fun_has_field()
Keyfun_has_field
:Returns a boolean indicating whether o has a member field called name.
.- Returns:
Returns a boolean indicating whether o has a member field called name.
-
_fun_has_field
public static org.jvnet.localizer.Localizable _fun_has_field()
Keyfun_has_field
:Returns a boolean indicating whether o has a member field called name.
.- Returns:
Returns a boolean indicating whether o has a member field called name.
-
math_ln
public static String math_ln()
Keymath_ln
:Returns the natural logarithm of n.
.- Returns:
Returns the natural logarithm of n.
-
_math_ln
public static org.jvnet.localizer.Localizable _math_ln()
Keymath_ln
:Returns the natural logarithm of n.
.- Returns:
Returns the natural logarithm of n.
-
str_unicode
public static String str_unicode()
Keystr_unicode
:Returns an array of strings describing each character of s in their full unicode notation.
.- Returns:
Returns an array of strings describing each character of s in their full unicode notation.
-
_str_unicode
public static org.jvnet.localizer.Localizable _str_unicode()
Keystr_unicode
:Returns an array of strings describing each character of s in their full unicode notation.
.- Returns:
Returns an array of strings describing each character of s in their full unicode notation.
-
str_diff
public static String str_diff()
Keystr_diff
:For strings, takes two strings and compares them, returning a string. Returns the remainder of o2 starting with the first character where they differ. For dates, returns the difference in given time units. See the time unit table at https://openrefine.org/docs/manual/grelfunctions/#datepartd-s-timeunit.
.- Returns:
For strings, takes two strings and compares them, returning a string. Returns the remainder of o2 starting with the first character where they differ. For dates, returns the difference in given time units. See the time unit table at https://openrefine.org/docs/manual/grelfunctions/#datepartd-s-timeunit.
-
_str_diff
public static org.jvnet.localizer.Localizable _str_diff()
Keystr_diff
:For strings, takes two strings and compares them, returning a string. Returns the remainder of o2 starting with the first character where they differ. For dates, returns the difference in given time units. See the time unit table at https://openrefine.org/docs/manual/grelfunctions/#datepartd-s-timeunit.
.- Returns:
For strings, takes two strings and compares them, returning a string. Returns the remainder of o2 starting with the first character where they differ. For dates, returns the difference in given time units. See the time unit table at https://openrefine.org/docs/manual/grelfunctions/#datepartd-s-timeunit.
-
str_parse_json
public static String str_parse_json()
Keystr_parse_json
:Parses a string as JSON.
.- Returns:
Parses a string as JSON.
-
_str_parse_json
public static org.jvnet.localizer.Localizable _str_parse_json()
Keystr_parse_json
:Parses a string as JSON.
.- Returns:
Parses a string as JSON.
-
fun_to_string
public static String fun_to_string()
Keyfun_to_string
:Takes any value type (string, number, date, boolean, error, null) and gives a string version of that value. You can convert numbers to strings with rounding, using an optional string format. See https://docs.oracle.com/javase/8/docs/api/java/util/Formatter.html. You can also convert dates to strings using date parsing syntax. See https://openrefine.org/docs/manual/grelfunctions/#date-functions.
.- Returns:
Takes any value type (string, number, date, boolean, error, null) and gives a string version of that value. You can convert numbers to strings with rounding, using an optional string format. See https://docs.oracle.com/javase/8/docs/api/java/util/Formatter.html. You can also convert dates to strings using date parsing syntax. See https://openrefine.org/docs/manual/grelfunctions/#date-functions.
-
_fun_to_string
public static org.jvnet.localizer.Localizable _fun_to_string()
Keyfun_to_string
:Takes any value type (string, number, date, boolean, error, null) and gives a string version of that value. You can convert numbers to strings with rounding, using an optional string format. See https://docs.oracle.com/javase/8/docs/api/java/util/Formatter.html. You can also convert dates to strings using date parsing syntax. See https://openrefine.org/docs/manual/grelfunctions/#date-functions.
.- Returns:
Takes any value type (string, number, date, boolean, error, null) and gives a string version of that value. You can convert numbers to strings with rounding, using an optional string format. See https://docs.oracle.com/javase/8/docs/api/java/util/Formatter.html. You can also convert dates to strings using date parsing syntax. See https://openrefine.org/docs/manual/grelfunctions/#date-functions.
-
str_last_index_of
public static String str_last_index_of()
Keystr_last_index_of
:Returns the first character index of sub as it last occurs in s; or, returns -1 if s does not contain sub. For example, "parallel".lastIndexOf("a") returns 3 (pointing at the second ''a'').
.- Returns:
Returns the first character index of sub as it last occurs in s; or, returns -1 if s does not contain sub. For example, "parallel".lastIndexOf("a") returns 3 (pointing at the second ''a'').
-
_str_last_index_of
public static org.jvnet.localizer.Localizable _str_last_index_of()
Keystr_last_index_of
:Returns the first character index of sub as it last occurs in s; or, returns -1 if s does not contain sub. For example, "parallel".lastIndexOf("a") returns 3 (pointing at the second ''a'').
.- Returns:
Returns the first character index of sub as it last occurs in s; or, returns -1 if s does not contain sub. For example, "parallel".lastIndexOf("a") returns 3 (pointing at the second ''a'').
-
fun_time_since_unix_epoch_to_date
public static String fun_time_since_unix_epoch_to_date()
Keyfun_time_since_unix_epoch_to_date
:Returns a number converted to a date based on Unix Epoch Time. The number can be Unix Epoch Time in one of the following supported units: second, millisecond, microsecond. Defaults to ''second''.
.- Returns:
Returns a number converted to a date based on Unix Epoch Time. The number can be Unix Epoch Time in one of the following supported units: second, millisecond, microsecond. Defaults to ''second''.
-
_fun_time_since_unix_epoch_to_date
public static org.jvnet.localizer.Localizable _fun_time_since_unix_epoch_to_date()
Keyfun_time_since_unix_epoch_to_date
:Returns a number converted to a date based on Unix Epoch Time. The number can be Unix Epoch Time in one of the following supported units: second, millisecond, microsecond. Defaults to ''second''.
.- Returns:
Returns a number converted to a date based on Unix Epoch Time. The number can be Unix Epoch Time in one of the following supported units: second, millisecond, microsecond. Defaults to ''second''.
-
html_inner_html
public static String html_inner_html()
Keyhtml_inner_html
:Returns the inner HTML of an HTML element. This will include text and children elements within the element selected. Use it in conjunction with parseHtml() and select() to provide an element.
.- Returns:
Returns the inner HTML of an HTML element. This will include text and children elements within the element selected. Use it in conjunction with parseHtml() and select() to provide an element.
-
_html_inner_html
public static org.jvnet.localizer.Localizable _html_inner_html()
Keyhtml_inner_html
:Returns the inner HTML of an HTML element. This will include text and children elements within the element selected. Use it in conjunction with parseHtml() and select() to provide an element.
.- Returns:
Returns the inner HTML of an HTML element. This will include text and children elements within the element selected. Use it in conjunction with parseHtml() and select() to provide an element.
-
math_abs
public static String math_abs()
Keymath_abs
:Returns the absolute value of a number.
.- Returns:
Returns the absolute value of a number.
-
_math_abs
public static org.jvnet.localizer.Localizable _math_abs()
Keymath_abs
:Returns the absolute value of a number.
.- Returns:
Returns the absolute value of a number.
-
math_quotient
public static String math_quotient()
Keymath_quotient
:Returns the integer portion of a division (truncated, not rounded), when supplied with a numerator and denominator.
.- Returns:
Returns the integer portion of a division (truncated, not rounded), when supplied with a numerator and denominator.
-
_math_quotient
public static org.jvnet.localizer.Localizable _math_quotient()
Keymath_quotient
:Returns the integer portion of a division (truncated, not rounded), when supplied with a numerator and denominator.
.- Returns:
Returns the integer portion of a division (truncated, not rounded), when supplied with a numerator and denominator.
-
math_pow
public static String math_pow()
Keymath_pow
:Returns n1 raised to the power of n2.
.- Returns:
Returns n1 raised to the power of n2.
-
_math_pow
public static org.jvnet.localizer.Localizable _math_pow()
Keymath_pow
:Returns n1 raised to the power of n2.
.- Returns:
Returns n1 raised to the power of n2.
-
math_max
public static String math_max()
Keymath_max
:Returns the greater of two numbers.
.- Returns:
Returns the greater of two numbers.
-
_math_max
public static org.jvnet.localizer.Localizable _math_max()
Keymath_max
:Returns the greater of two numbers.
.- Returns:
Returns the greater of two numbers.
-
arr_args_to_array
public static String arr_args_to_array()
Keyarr_args_to_array
:Returns all arguments passed to it as an array
.- Returns:
Returns all arguments passed to it as an array
-
_arr_args_to_array
public static org.jvnet.localizer.Localizable _arr_args_to_array()
Keyarr_args_to_array
:Returns all arguments passed to it as an array
.- Returns:
Returns all arguments passed to it as an array
-
math_even
public static String math_even()
Keymath_even
:Rounds the number up to the nearest even integer.
.- Returns:
Rounds the number up to the nearest even integer.
-
_math_even
public static org.jvnet.localizer.Localizable _math_even()
Keymath_even
:Rounds the number up to the nearest even integer.
.- Returns:
Rounds the number up to the nearest even integer.
-
fun_cross
public static String fun_cross()
Keyfun_cross
:Looks up the given value in the target column of the target project, returns an array of matched rows. Two values match if and only if they have the same string representation. The first argument will be interpreted as cell.value if set to cell. The second argument will be interpreted as the current project name if omitted or set to "". The third argument will be interpreted as the index (starts from 0) column if omitted or set to "".
.- Returns:
Looks up the given value in the target column of the target project, returns an array of matched rows. Two values match if and only if they have the same string representation. The first argument will be interpreted as cell.value if set to cell. The second argument will be interpreted as the current project name if omitted or set to "". The third argument will be interpreted as the index (starts from 0) column if omitted or set to "".
-
_fun_cross
public static org.jvnet.localizer.Localizable _fun_cross()
Keyfun_cross
:Looks up the given value in the target column of the target project, returns an array of matched rows. Two values match if and only if they have the same string representation. The first argument will be interpreted as cell.value if set to cell. The second argument will be interpreted as the current project name if omitted or set to "". The third argument will be interpreted as the index (starts from 0) column if omitted or set to "".
.- Returns:
Looks up the given value in the target column of the target project, returns an array of matched rows. Two values match if and only if they have the same string representation. The first argument will be interpreted as cell.value if set to cell. The second argument will be interpreted as the current project name if omitted or set to "". The third argument will be interpreted as the index (starts from 0) column if omitted or set to "".
-
math_sum
public static String math_sum()
Keymath_sum
:Return the sum of the numbers in the array. Ignores non-number items. Returns 0 if the array does not contain numbers.
.- Returns:
Return the sum of the numbers in the array. Ignores non-number items. Returns 0 if the array does not contain numbers.
-
_math_sum
public static org.jvnet.localizer.Localizable _math_sum()
Keymath_sum
:Return the sum of the numbers in the array. Ignores non-number items. Returns 0 if the array does not contain numbers.
.- Returns:
Return the sum of the numbers in the array. Ignores non-number items. Returns 0 if the array does not contain numbers.
-
str_detect_language
public static String str_detect_language()
Keystr_detect_language
:Detects the language of the given string and provides the language code.
.- Returns:
Detects the language of the given string and provides the language code.
-
_str_detect_language
public static org.jvnet.localizer.Localizable _str_detect_language()
Keystr_detect_language
:Detects the language of the given string and provides the language code.
.- Returns:
Detects the language of the given string and provides the language code.
-
str_parse_uri
public static String str_parse_uri()
Keystr_parse_uri
:Parses a URI and extracts its components.
.- Returns:
Parses a URI and extracts its components.
-
_str_parse_uri
public static org.jvnet.localizer.Localizable _str_parse_uri()
Keystr_parse_uri
:Parses a URI and extracts its components.
.- Returns:
Parses a URI and extracts its components.
-
xml_xmltext
public static String xml_xmltext()
Keyxml_xmltext
:Returns a string of the text from within an HTML or XML element (including all child elements), removing tags and line breaks inside the string. Use it in conjunction with parseHtml() or parseXml() and select() to provide an element.
.- Returns:
Returns a string of the text from within an HTML or XML element (including all child elements), removing tags and line breaks inside the string. Use it in conjunction with parseHtml() or parseXml() and select() to provide an element.
-
_xml_xmltext
public static org.jvnet.localizer.Localizable _xml_xmltext()
Keyxml_xmltext
:Returns a string of the text from within an HTML or XML element (including all child elements), removing tags and line breaks inside the string. Use it in conjunction with parseHtml() or parseXml() and select() to provide an element.
.- Returns:
Returns a string of the text from within an HTML or XML element (including all child elements), removing tags and line breaks inside the string. Use it in conjunction with parseHtml() or parseXml() and select() to provide an element.
-
str_starts_with
public static String str_starts_with()
Keystr_starts_with
:Returns a boolean indicating whether s starts with sub. For example, "food".startsWith("foo") returns true, whereas "food".startsWith("bar") returns false.
.- Returns:
Returns a boolean indicating whether s starts with sub. For example, "food".startsWith("foo") returns true, whereas "food".startsWith("bar") returns false.
-
_str_starts_with
public static org.jvnet.localizer.Localizable _str_starts_with()
Keystr_starts_with
:Returns a boolean indicating whether s starts with sub. For example, "food".startsWith("foo") returns true, whereas "food".startsWith("bar") returns false.
.- Returns:
Returns a boolean indicating whether s starts with sub. For example, "food".startsWith("foo") returns true, whereas "food".startsWith("bar") returns false.
-
str_find
public static String str_find()
Keystr_find
:Outputs an array of all consecutive substrings inside string s that match the substring or regex pattern p. You can supply a substring by putting it in quotes. See also match().
.- Returns:
Outputs an array of all consecutive substrings inside string s that match the substring or regex pattern p. You can supply a substring by putting it in quotes. See also match().
-
_str_find
public static org.jvnet.localizer.Localizable _str_find()
Keystr_find
:Outputs an array of all consecutive substrings inside string s that match the substring or regex pattern p. You can supply a substring by putting it in quotes. See also match().
.- Returns:
Outputs an array of all consecutive substrings inside string s that match the substring or regex pattern p. You can supply a substring by putting it in quotes. See also match().
-
fun_slice
public static String fun_slice()
Keyfun_slice
:Given a string, returns the substring starting from character index from, and up to character index to. If the to argument is omitted, will output to the end of s. Remember character indices start from zero. Given an array, returns a sub-array from the first index provided up to and including the last index provided. If the to value is omitted, it is understood to be the end of the array. Slice only.
.- Returns:
Given a string, returns the substring starting from character index from, and up to character index to. If the to argument is omitted, will output to the end of s. Remember character indices start from zero. Given an array, returns a sub-array from the first index provided up to and including the last index provided. If the to value is omitted, it is understood to be the end of the array. Slice only.
-
_fun_slice
public static org.jvnet.localizer.Localizable _fun_slice()
Keyfun_slice
:Given a string, returns the substring starting from character index from, and up to character index to. If the to argument is omitted, will output to the end of s. Remember character indices start from zero. Given an array, returns a sub-array from the first index provided up to and including the last index provided. If the to value is omitted, it is understood to be the end of the array. Slice only.
.- Returns:
Given a string, returns the substring starting from character index from, and up to character index to. If the to argument is omitted, will output to the end of s. Remember character indices start from zero. Given an array, returns a sub-array from the first index provided up to and including the last index provided. If the to value is omitted, it is understood to be the end of the array. Slice only.
-
arr_sort
public static String arr_sort()
Keyarr_sort
:Sorts the array in ascending order. Sorting is case-sensitive, uppercase first and lowercase second.
.- Returns:
Sorts the array in ascending order. Sorting is case-sensitive, uppercase first and lowercase second.
-
_arr_sort
public static org.jvnet.localizer.Localizable _arr_sort()
Keyarr_sort
:Sorts the array in ascending order. Sorting is case-sensitive, uppercase first and lowercase second.
.- Returns:
Sorts the array in ascending order. Sorting is case-sensitive, uppercase first and lowercase second.
-
math_min
public static String math_min()
Keymath_min
:Returns the smaller of two numbers.
.- Returns:
Returns the smaller of two numbers.
-
_math_min
public static org.jvnet.localizer.Localizable _math_min()
Keymath_min
:Returns the smaller of two numbers.
.- Returns:
Returns the smaller of two numbers.
-
fun_length
public static String fun_length()
Keyfun_length
:Returns the length of string s as a number, or the size of array a, meaning the number of objects inside it. Arrays can be empty, in which case length() will return 0.
.- Returns:
Returns the length of string s as a number, or the size of array a, meaning the number of objects inside it. Arrays can be empty, in which case length() will return 0.
-
_fun_length
public static org.jvnet.localizer.Localizable _fun_length()
Keyfun_length
:Returns the length of string s as a number, or the size of array a, meaning the number of objects inside it. Arrays can be empty, in which case length() will return 0.
.- Returns:
Returns the length of string s as a number, or the size of array a, meaning the number of objects inside it. Arrays can be empty, in which case length() will return 0.
-
str_partition
public static String str_partition()
Keystr_partition
:Returns an array of strings [ a, fragment, z ] where a is the substring within s before the first occurrence of fragment, and z is the substring after fragment. Fragment can be a string or a regex. If omitFragment is true, frag is not returned.
.- Returns:
Returns an array of strings [ a, fragment, z ] where a is the substring within s before the first occurrence of fragment, and z is the substring after fragment. Fragment can be a string or a regex. If omitFragment is true, frag is not returned.
-
_str_partition
public static org.jvnet.localizer.Localizable _str_partition()
Keystr_partition
:Returns an array of strings [ a, fragment, z ] where a is the substring within s before the first occurrence of fragment, and z is the substring after fragment. Fragment can be a string or a regex. If omitFragment is true, frag is not returned.
.- Returns:
Returns an array of strings [ a, fragment, z ] where a is the substring within s before the first occurrence of fragment, and z is the substring after fragment. Fragment can be a string or a regex. If omitFragment is true, frag is not returned.
-
bool_not
public static String bool_not()
Keybool_not
:Uses the logical operator NOT on a boolean to output a boolean. For example, not(1 > 7) returns true because 1 > 7 itself is false.
.- Returns:
Uses the logical operator NOT on a boolean to output a boolean. For example, not(1 > 7) returns true because 1 > 7 itself is false.
-
_bool_not
public static org.jvnet.localizer.Localizable _bool_not()
Keybool_not
:Uses the logical operator NOT on a boolean to output a boolean. For example, not(1 > 7) returns true because 1 > 7 itself is false.
.- Returns:
Uses the logical operator NOT on a boolean to output a boolean. For example, not(1 > 7) returns true because 1 > 7 itself is false.
-
str_range
public static String str_range()
Keystr_range
:Returns an array where a and b are the start and the end of the range respectively and c is the step (increment).
.- Returns:
Returns an array where a and b are the start and the end of the range respectively and c is the step (increment).
-
_str_range
public static org.jvnet.localizer.Localizable _str_range()
Keystr_range
:Returns an array where a and b are the start and the end of the range respectively and c is the step (increment).
.- Returns:
Returns an array where a and b are the start and the end of the range respectively and c is the step (increment).
-
math_ceil
public static String math_ceil()
Keymath_ceil
:Returns the ceiling of a number.
.- Returns:
Returns the ceiling of a number.
-
_math_ceil
public static org.jvnet.localizer.Localizable _math_ceil()
Keymath_ceil
:Returns the ceiling of a number.
.- Returns:
Returns the ceiling of a number.
-
math_log
public static String math_log()
Keymath_log
:Returns the base 10 logarithm of n.
.- Returns:
Returns the base 10 logarithm of n.
-
_math_log
public static org.jvnet.localizer.Localizable _math_log()
Keymath_log
:Returns the base 10 logarithm of n.
.- Returns:
Returns the base 10 logarithm of n.
-
xml_parent
public static String xml_parent()
Keyxml_parent
:Returns the parent node or null if no parent. Use it in conjunction with parseHtml() and select() to provide an element.
.- Returns:
Returns the parent node or null if no parent. Use it in conjunction with parseHtml() and select() to provide an element.
-
_xml_parent
public static org.jvnet.localizer.Localizable _xml_parent()
Keyxml_parent
:Returns the parent node or null if no parent. Use it in conjunction with parseHtml() and select() to provide an element.
.- Returns:
Returns the parent node or null if no parent. Use it in conjunction with parseHtml() and select() to provide an element.
-
str_split
public static String str_split()
Keystr_split
:Returns the array of strings obtained by splitting s by sep. The separator can be either a string or a regex pattern. If preserveTokens is true, empty segments are preserved.
.- Returns:
Returns the array of strings obtained by splitting s by sep. The separator can be either a string or a regex pattern. If preserveTokens is true, empty segments are preserved.
-
_str_split
public static org.jvnet.localizer.Localizable _str_split()
Keystr_split
:Returns the array of strings obtained by splitting s by sep. The separator can be either a string or a regex pattern. If preserveTokens is true, empty segments are preserved.
.- Returns:
Returns the array of strings obtained by splitting s by sep. The separator can be either a string or a regex pattern. If preserveTokens is true, empty segments are preserved.
-
str_replace_chars
public static String str_replace_chars()
Keystr_replace_chars
:Returns the string obtained by replacing a character in s, identified by find, with the corresponding character identified in replace. You cannot use this to replace a single character with more than one character.
.- Returns:
Returns the string obtained by replacing a character in s, identified by find, with the corresponding character identified in replace. You cannot use this to replace a single character with more than one character.
-
_str_replace_chars
public static org.jvnet.localizer.Localizable _str_replace_chars()
Keystr_replace_chars
:Returns the string obtained by replacing a character in s, identified by find, with the corresponding character identified in replace. You cannot use this to replace a single character with more than one character.
.- Returns:
Returns the string obtained by replacing a character in s, identified by find, with the corresponding character identified in replace. You cannot use this to replace a single character with more than one character.
-
xml_parsexml
public static String xml_parsexml()
Keyxml_parsexml
:Given a cell full of XML-formatted text, parseXml() returns a full XML document and adds any missing closing tags.
.- Returns:
Given a cell full of XML-formatted text, parseXml() returns a full XML document and adds any missing closing tags.
-
_xml_parsexml
public static org.jvnet.localizer.Localizable _xml_parsexml()
Keyxml_parsexml
:Given a cell full of XML-formatted text, parseXml() returns a full XML document and adds any missing closing tags.
.- Returns:
Given a cell full of XML-formatted text, parseXml() returns a full XML document and adds any missing closing tags.
-
bool_or
public static String bool_or()
Keybool_or
:Uses the logical operator OR on two or more booleans to output a boolean. For example, (1 < 3).or(1 > 7) returns true because at least one of the conditions (the first one) is true.
.- Returns:
Uses the logical operator OR on two or more booleans to output a boolean. For example, (1 < 3).or(1 > 7) returns true because at least one of the conditions (the first one) is true.
-
_bool_or
public static org.jvnet.localizer.Localizable _bool_or()
Keybool_or
:Uses the logical operator OR on two or more booleans to output a boolean. For example, (1 < 3).or(1 > 7) returns true because at least one of the conditions (the first one) is true.
.- Returns:
Uses the logical operator OR on two or more booleans to output a boolean. For example, (1 < 3).or(1 > 7) returns true because at least one of the conditions (the first one) is true.
-
str_fingerprint
public static String str_fingerprint()
Keystr_fingerprint
:Returns the fingerprint of s, a string that is the first step in fingerprint clustering methods: it will trim whitespaces, convert all characters to lowercase, remove punctuation, sort words alphabetically, etc.
.- Returns:
Returns the fingerprint of s, a string that is the first step in fingerprint clustering methods: it will trim whitespaces, convert all characters to lowercase, remove punctuation, sort words alphabetically, etc.
-
_str_fingerprint
public static org.jvnet.localizer.Localizable _str_fingerprint()
Keystr_fingerprint
:Returns the fingerprint of s, a string that is the first step in fingerprint clustering methods: it will trim whitespaces, convert all characters to lowercase, remove punctuation, sort words alphabetically, etc.
.- Returns:
Returns the fingerprint of s, a string that is the first step in fingerprint clustering methods: it will trim whitespaces, convert all characters to lowercase, remove punctuation, sort words alphabetically, etc.
-
arr_join
public static String arr_join()
Keyarr_join
:Joins the items in the array with sep, and returns it all as a string.
.- Returns:
Joins the items in the array with sep, and returns it all as a string.
-
_arr_join
public static org.jvnet.localizer.Localizable _arr_join()
Keyarr_join
:Joins the items in the array with sep, and returns it all as a string.
.- Returns:
Joins the items in the array with sep, and returns it all as a string.
-
math_odd
public static String math_odd()
Keymath_odd
:Rounds the number up to the nearest odd integer.
.- Returns:
Rounds the number up to the nearest odd integer.
-
_math_odd
public static org.jvnet.localizer.Localizable _math_odd()
Keymath_odd
:Rounds the number up to the nearest odd integer.
.- Returns:
Rounds the number up to the nearest odd integer.
-
bool_and
public static String bool_and()
Keybool_and
:Uses the logical operator AND on two or more booleans to output a boolean. Evaluates multiple statements into booleans, then returns true if all the statements are true. For example, (1 < 3).and(1 < 0) returns false because one condition is true and one is false.
.- Returns:
Uses the logical operator AND on two or more booleans to output a boolean. Evaluates multiple statements into booleans, then returns true if all the statements are true. For example, (1 < 3).and(1 < 0) returns false because one condition is true and one is false.
-
_bool_and
public static org.jvnet.localizer.Localizable _bool_and()
Keybool_and
:Uses the logical operator AND on two or more booleans to output a boolean. Evaluates multiple statements into booleans, then returns true if all the statements are true. For example, (1 < 3).and(1 < 0) returns false because one condition is true and one is false.
.- Returns:
Uses the logical operator AND on two or more booleans to output a boolean. Evaluates multiple statements into booleans, then returns true if all the statements are true. For example, (1 < 3).and(1 < 0) returns false because one condition is true and one is false.
-
str_index_of
public static String str_index_of()
Keystr_index_of
:Returns the first character index of sub as it first occurs in s; or, returns -1 if s does not contain sub. For example, "internationalization".indexOf("nation") returns 5.
.- Returns:
Returns the first character index of sub as it first occurs in s; or, returns -1 if s does not contain sub. For example, "internationalization".indexOf("nation") returns 5.
-
_str_index_of
public static org.jvnet.localizer.Localizable _str_index_of()
Keystr_index_of
:Returns the first character index of sub as it first occurs in s; or, returns -1 if s does not contain sub. For example, "internationalization".indexOf("nation") returns 5.
.- Returns:
Returns the first character index of sub as it first occurs in s; or, returns -1 if s does not contain sub. For example, "internationalization".indexOf("nation") returns 5.
-
str_ngram
public static String str_ngram()
Keystr_ngram
:Returns an array of the word n-grams of s. That is, it lists all the possible consecutive combinations of n words in the string.
.- Returns:
Returns an array of the word n-grams of s. That is, it lists all the possible consecutive combinations of n words in the string.
-
_str_ngram
public static org.jvnet.localizer.Localizable _str_ngram()
Keystr_ngram
:Returns an array of the word n-grams of s. That is, it lists all the possible consecutive combinations of n words in the string.
.- Returns:
Returns an array of the word n-grams of s. That is, it lists all the possible consecutive combinations of n words in the string.
-
math_exp
public static String math_exp()
Keymath_exp
:Returns e to the power of n.
.- Returns:
Returns e to the power of n.
-
_math_exp
public static org.jvnet.localizer.Localizable _math_exp()
Keymath_exp
:Returns e to the power of n.
.- Returns:
Returns e to the power of n.
-
str_unescape
public static String str_unescape()
Keystr_unescape
:Unescapes s in the given escaping mode. The mode can be one of: ''html'', ''xml'', ''csv'', ''url'', ''javascript''. Note that quotes are required around your mode.
.- Returns:
Unescapes s in the given escaping mode. The mode can be one of: ''html'', ''xml'', ''csv'', ''url'', ''javascript''. Note that quotes are required around your mode.
-
_str_unescape
public static org.jvnet.localizer.Localizable _str_unescape()
Keystr_unescape
:Unescapes s in the given escaping mode. The mode can be one of: ''html'', ''xml'', ''csv'', ''url'', ''javascript''. Note that quotes are required around your mode.
.- Returns:
Unescapes s in the given escaping mode. The mode can be one of: ''html'', ''xml'', ''csv'', ''url'', ''javascript''. Note that quotes are required around your mode.
-
xml_xmlattr
public static String xml_xmlattr()
Keyxml_xmlattr
:Returns a string from an attribute on an XML or HTML element. Use it in conjunction with parseHtml() or parseXml() to point to an element first.
.- Returns:
Returns a string from an attribute on an XML or HTML element. Use it in conjunction with parseHtml() or parseXml() to point to an element first.
-
_xml_xmlattr
public static org.jvnet.localizer.Localizable _xml_xmlattr()
Keyxml_xmlattr
:Returns a string from an attribute on an XML or HTML element. Use it in conjunction with parseHtml() or parseXml() to point to an element first.
.- Returns:
Returns a string from an attribute on an XML or HTML element. Use it in conjunction with parseHtml() or parseXml() to point to an element first.
-
math_radians
public static String math_radians()
Keymath_radians
:Converts an angle in degrees to radians.
.- Returns:
Converts an angle in degrees to radians.
-
_math_radians
public static org.jvnet.localizer.Localizable _math_radians()
Keymath_radians
:Converts an angle in degrees to radians.
.- Returns:
Converts an angle in degrees to radians.
-
str_phonetic
public static String str_phonetic()
Keystr_phonetic
:Returns a phonetic encoding of a string, based on an available phonetic algorithm. Can be one of the following supported phonetic methods: metaphone, doublemetaphone, metaphone3, soundex, cologne. Defaults to ''metaphone3''.
.- Returns:
Returns a phonetic encoding of a string, based on an available phonetic algorithm. Can be one of the following supported phonetic methods: metaphone, doublemetaphone, metaphone3, soundex, cologne. Defaults to ''metaphone3''.
-
_str_phonetic
public static org.jvnet.localizer.Localizable _str_phonetic()
Keystr_phonetic
:Returns a phonetic encoding of a string, based on an available phonetic algorithm. Can be one of the following supported phonetic methods: metaphone, doublemetaphone, metaphone3, soundex, cologne. Defaults to ''metaphone3''.
.- Returns:
Returns a phonetic encoding of a string, based on an available phonetic algorithm. Can be one of the following supported phonetic methods: metaphone, doublemetaphone, metaphone3, soundex, cologne. Defaults to ''metaphone3''.
-
str_smart_split
public static String str_smart_split()
Keystr_smart_split
:Returns the array of strings obtained by splitting s by sep, or by guessing either tab or comma separation if there is no sep given. Handles quotes properly and understands cancelled characters. The separator can be either a string or a regex pattern.
.- Returns:
Returns the array of strings obtained by splitting s by sep, or by guessing either tab or comma separation if there is no sep given. Handles quotes properly and understands cancelled characters. The separator can be either a string or a regex pattern.
-
_str_smart_split
public static org.jvnet.localizer.Localizable _str_smart_split()
Keystr_smart_split
:Returns the array of strings obtained by splitting s by sep, or by guessing either tab or comma separation if there is no sep given. Handles quotes properly and understands cancelled characters. The separator can be either a string or a regex pattern.
.- Returns:
Returns the array of strings obtained by splitting s by sep, or by guessing either tab or comma separation if there is no sep given. Handles quotes properly and understands cancelled characters. The separator can be either a string or a regex pattern.
-
fun_to_number
public static String fun_to_number()
Keyfun_to_number
:Returns a string converted to a number. Will attempt to convert other formats into a string, then into a number. If the value is already a number, it will return the number.
.- Returns:
Returns a string converted to a number. Will attempt to convert other formats into a string, then into a number. If the value is already a number, it will return the number.
-
_fun_to_number
public static org.jvnet.localizer.Localizable _fun_to_number()
Keyfun_to_number
:Returns a string converted to a number. Will attempt to convert other formats into a string, then into a number. If the value is already a number, it will return the number.
.- Returns:
Returns a string converted to a number. Will attempt to convert other formats into a string, then into a number. If the value is already a number, it will return the number.
-
xml_owntext
public static String xml_owntext()
Keyxml_owntext
:Returns the text directly inside the selected XML or HTML element only, ignoring text inside children elements (for this, use innerXml()). Use it in conjunction with a parser and select() to provide an element.
.- Returns:
Returns the text directly inside the selected XML or HTML element only, ignoring text inside children elements (for this, use innerXml()). Use it in conjunction with a parser and select() to provide an element.
-
_xml_owntext
public static org.jvnet.localizer.Localizable _xml_owntext()
Keyxml_owntext
:Returns the text directly inside the selected XML or HTML element only, ignoring text inside children elements (for this, use innerXml()). Use it in conjunction with a parser and select() to provide an element.
.- Returns:
Returns the text directly inside the selected XML or HTML element only, ignoring text inside children elements (for this, use innerXml()). Use it in conjunction with a parser and select() to provide an element.
-
str_to_title_case
public static String str_to_title_case()
Keystr_to_title_case
:Returns string s converted into titlecase: a capital letter starting each word, and the rest of the letters lowercase. For example, ''Once upon a midnight DREARY''.toTitlecase() returns the string ''Once Upon A Midnight Dreary''.
.- Returns:
Returns string s converted into titlecase: a capital letter starting each word, and the rest of the letters lowercase. For example, ''Once upon a midnight DREARY''.toTitlecase() returns the string ''Once Upon A Midnight Dreary''.
-
_str_to_title_case
public static org.jvnet.localizer.Localizable _str_to_title_case()
Keystr_to_title_case
:Returns string s converted into titlecase: a capital letter starting each word, and the rest of the letters lowercase. For example, ''Once upon a midnight DREARY''.toTitlecase() returns the string ''Once Upon A Midnight Dreary''.
.- Returns:
Returns string s converted into titlecase: a capital letter starting each word, and the rest of the letters lowercase. For example, ''Once upon a midnight DREARY''.toTitlecase() returns the string ''Once Upon A Midnight Dreary''.
-
fun_facet_count
public static String fun_facet_count()
Keyfun_facet_count
:Returns the facet count corresponding to the given choice value, by looking for the facetExpression in the choiceValue in columnName.
.- Returns:
Returns the facet count corresponding to the given choice value, by looking for the facetExpression in the choiceValue in columnName.
-
_fun_facet_count
public static org.jvnet.localizer.Localizable _fun_facet_count()
Keyfun_facet_count
:Returns the facet count corresponding to the given choice value, by looking for the facetExpression in the choiceValue in columnName.
.- Returns:
Returns the facet count corresponding to the given choice value, by looking for the facetExpression in the choiceValue in columnName.
-
str_match
public static String str_match()
Keystr_match
:Attempts to match the string s in its entirety against the regex pattern p and, if the pattern is found, outputs an array of all capturing groups (found in order). See also find().
.- Returns:
Attempts to match the string s in its entirety against the regex pattern p and, if the pattern is found, outputs an array of all capturing groups (found in order). See also find().
-
_str_match
public static org.jvnet.localizer.Localizable _str_match()
Keystr_match
:Attempts to match the string s in its entirety against the regex pattern p and, if the pattern is found, outputs an array of all capturing groups (found in order). See also find().
.- Returns:
Attempts to match the string s in its entirety against the regex pattern p and, if the pattern is found, outputs an array of all capturing groups (found in order). See also find().
-
math_combin
public static String math_combin()
Keymath_combin
:Returns the number of combinations for n2 elements as divided into n1.
.- Returns:
Returns the number of combinations for n2 elements as divided into n1.
-
_math_combin
public static org.jvnet.localizer.Localizable _math_combin()
Keymath_combin
:Returns the number of combinations for n2 elements as divided into n1.
.- Returns:
Returns the number of combinations for n2 elements as divided into n1.
-
str_md5
public static String str_md5()
Keystr_md5
:Returns the MD5 hash of an object. If fed something other than a string (array, number, date, etc.), md5() will convert it to a string and deliver the hash of the string.
.- Returns:
Returns the MD5 hash of an object. If fed something other than a string (array, number, date, etc.), md5() will convert it to a string and deliver the hash of the string.
-
_str_md5
public static org.jvnet.localizer.Localizable _str_md5()
Keystr_md5
:Returns the MD5 hash of an object. If fed something other than a string (array, number, date, etc.), md5() will convert it to a string and deliver the hash of the string.
.- Returns:
Returns the MD5 hash of an object. If fed something other than a string (array, number, date, etc.), md5() will convert it to a string and deliver the hash of the string.
-
math_gcd
public static String math_gcd()
Keymath_gcd
:Returns the greatest common denominator of two numbers.
.- Returns:
Returns the greatest common denominator of two numbers.
-
_math_gcd
public static org.jvnet.localizer.Localizable _math_gcd()
Keymath_gcd
:Returns the greatest common denominator of two numbers.
.- Returns:
Returns the greatest common denominator of two numbers.
-
str_decode
public static String str_decode()
Keystr_decode
:Decodes a string using the specified encoding. Encodings include Base16, Base32Hex, Base32, Base64, and Base64Url.
.- Returns:
Decodes a string using the specified encoding. Encodings include Base16, Base32Hex, Base32, Base64, and Base64Url.
-
_str_decode
public static org.jvnet.localizer.Localizable _str_decode()
Keystr_decode
:Decodes a string using the specified encoding. Encodings include Base16, Base32Hex, Base32, Base64, and Base64Url.
.- Returns:
Decodes a string using the specified encoding. Encodings include Base16, Base32Hex, Base32, Base64, and Base64Url.
-
math_floor
public static String math_floor()
Keymath_floor
:Returns the floor of a number.
.- Returns:
Returns the floor of a number.
-
_math_floor
public static org.jvnet.localizer.Localizable _math_floor()
Keymath_floor
:Returns the floor of a number.
.- Returns:
Returns the floor of a number.
-
str_encode
public static String str_encode()
Keystr_encode
:Encodes a string using the specified encoding. Encodings include Base16, Base32Hex, Base32, Base64, and Base64Url.
.- Returns:
Encodes a string using the specified encoding. Encodings include Base16, Base32Hex, Base32, Base64, and Base64Url.
-
_str_encode
public static org.jvnet.localizer.Localizable _str_encode()
Keystr_encode
:Encodes a string using the specified encoding. Encodings include Base16, Base32Hex, Base32, Base64, and Base64Url.
.- Returns:
Encodes a string using the specified encoding. Encodings include Base16, Base32Hex, Base32, Base64, and Base64Url.
-
str_to_lowercase
public static String str_to_lowercase()
Keystr_to_lowercase
:Returns string s converted to all lowercase characters.
.- Returns:
Returns string s converted to all lowercase characters.
-
_str_to_lowercase
public static org.jvnet.localizer.Localizable _str_to_lowercase()
Keystr_to_lowercase
:Returns string s converted to all lowercase characters.
.- Returns:
Returns string s converted to all lowercase characters.
-
arr_uniques
public static String arr_uniques()
Keyarr_uniques
:Returns the array with duplicates removed. Case-sensitive.
.- Returns:
Returns the array with duplicates removed. Case-sensitive.
-
_arr_uniques
public static org.jvnet.localizer.Localizable _arr_uniques()
Keyarr_uniques
:Returns the array with duplicates removed. Case-sensitive.
.- Returns:
Returns the array with duplicates removed. Case-sensitive.
-
fun_coalesce
public static String fun_coalesce()
Keyfun_coalesce
:Returns the first non-null from a series of objects (meaning any data type - string, date, number, boolean, etc.).
.- Returns:
Returns the first non-null from a series of objects (meaning any data type - string, date, number, boolean, etc.).
-
_fun_coalesce
public static org.jvnet.localizer.Localizable _fun_coalesce()
Keyfun_coalesce
:Returns the first non-null from a series of objects (meaning any data type - string, date, number, boolean, etc.).
.- Returns:
Returns the first non-null from a series of objects (meaning any data type - string, date, number, boolean, etc.).
-
math_random_number
public static String math_random_number()
Keymath_random_number
:Returns a random integer in the interval between the lower and upper bounds (inclusively). Will output a different random number in each cell in a column.
.- Returns:
Returns a random integer in the interval between the lower and upper bounds (inclusively). Will output a different random number in each cell in a column.
-
_math_random_number
public static org.jvnet.localizer.Localizable _math_random_number()
Keymath_random_number
:Returns a random integer in the interval between the lower and upper bounds (inclusively). Will output a different random number in each cell in a column.
.- Returns:
Returns a random integer in the interval between the lower and upper bounds (inclusively). Will output a different random number in each cell in a column.
-
math_mod
public static String math_mod()
Keymath_mod
:Returns n1 modulus n2.
.- Returns:
Returns n1 modulus n2.
-
_math_mod
public static org.jvnet.localizer.Localizable _math_mod()
Keymath_mod
:Returns n1 modulus n2.
.- Returns:
Returns n1 modulus n2.
-
xml_wholetext
public static String xml_wholetext()
Keyxml_wholetext
:Selects the (unencoded) text of an element and its children, including any new lines and spaces, and returns a string of unencoded, un-normalized text. Use it in conjunction with parseHtml() and select() to provide an element.
.- Returns:
Selects the (unencoded) text of an element and its children, including any new lines and spaces, and returns a string of unencoded, un-normalized text. Use it in conjunction with parseHtml() and select() to provide an element.
-
_xml_wholetext
public static org.jvnet.localizer.Localizable _xml_wholetext()
Keyxml_wholetext
:Selects the (unencoded) text of an element and its children, including any new lines and spaces, and returns a string of unencoded, un-normalized text. Use it in conjunction with parseHtml() and select() to provide an element.
.- Returns:
Selects the (unencoded) text of an element and its children, including any new lines and spaces, and returns a string of unencoded, un-normalized text. Use it in conjunction with parseHtml() and select() to provide an element.
-
date_part
public static String date_part()
Keydate_part
:Returns part of a date. The data type returned depends on the unit. See https://openrefine.org/docs/manual/grelfunctions/#datepartd-s-timeunit, https://openrefine.org/docs/manual/grelfunctions#date-functions for a table.
.- Returns:
Returns part of a date. The data type returned depends on the unit. See https://openrefine.org/docs/manual/grelfunctions/#datepartd-s-timeunit, https://openrefine.org/docs/manual/grelfunctions#date-functions for a table.
-
_date_part
public static org.jvnet.localizer.Localizable _date_part()
Keydate_part
:Returns part of a date. The data type returned depends on the unit. See https://openrefine.org/docs/manual/grelfunctions/#datepartd-s-timeunit, https://openrefine.org/docs/manual/grelfunctions#date-functions for a table.
.- Returns:
Returns part of a date. The data type returned depends on the unit. See https://openrefine.org/docs/manual/grelfunctions/#datepartd-s-timeunit, https://openrefine.org/docs/manual/grelfunctions#date-functions for a table.
-
str_ends_with
public static String str_ends_with()
Keystr_ends_with
:Returns a boolean indicating whether s ends with sub. For example, "food".endsWith("ood") returns true, whereas "food".endsWith("odd") returns false.
.- Returns:
Returns a boolean indicating whether s ends with sub. For example, "food".endsWith("ood") returns true, whereas "food".endsWith("odd") returns false.
-
_str_ends_with
public static org.jvnet.localizer.Localizable _str_ends_with()
Keystr_ends_with
:Returns a boolean indicating whether s ends with sub. For example, "food".endsWith("ood") returns true, whereas "food".endsWith("odd") returns false.
.- Returns:
Returns a boolean indicating whether s ends with sub. For example, "food".endsWith("ood") returns true, whereas "food".endsWith("odd") returns false.
-
math_round
public static String math_round()
Keymath_round
:Rounds a number to the nearest integer.
.- Returns:
Rounds a number to the nearest integer.
-
_math_round
public static org.jvnet.localizer.Localizable _math_round()
Keymath_round
:Rounds a number to the nearest integer.
.- Returns:
Rounds a number to the nearest integer.
-
str_to_uppercase
public static String str_to_uppercase()
Keystr_to_uppercase
:Returns string s converted to all uppercase characters.
.- Returns:
Returns string s converted to all uppercase characters.
-
_str_to_uppercase
public static org.jvnet.localizer.Localizable _str_to_uppercase()
Keystr_to_uppercase
:Returns string s converted to all uppercase characters.
.- Returns:
Returns string s converted to all uppercase characters.
-
xml_scripttext
public static String xml_scripttext()
Keyxml_scripttext
:Returns the combined data of an HTML/XML Element. Data is e.g. the inside of a <script> tag. Note that data is NOT the text of the element. Use htmlText() to get the text that would be visible to a user, and scriptText() for the contents of <script>, <style>, etc. Use scriptText() in conjunction with parseHtml() and select().
.- Returns:
Returns the combined data of an HTML/XML Element. Data is e.g. the inside of a <script> tag. Note that data is NOT the text of the element. Use htmlText() to get the text that would be visible to a user, and scriptText() for the contents of <script>, <style>, etc. Use scriptText() in conjunction with parseHtml() and select().
-
_xml_scripttext
public static org.jvnet.localizer.Localizable _xml_scripttext()
Keyxml_scripttext
:Returns the combined data of an HTML/XML Element. Data is e.g. the inside of a <script> tag. Note that data is NOT the text of the element. Use htmlText() to get the text that would be visible to a user, and scriptText() for the contents of <script>, <style>, etc. Use scriptText() in conjunction with parseHtml() and select().
.- Returns:
Returns the combined data of an HTML/XML Element. Data is e.g. the inside of a <script> tag. Note that data is NOT the text of the element. Use htmlText() to get the text that would be visible to a user, and scriptText() for the contents of <script>, <style>, etc. Use scriptText() in conjunction with parseHtml() and select().
-
math_sin
public static String math_sin()
Keymath_sin
:Returns the trigonometric sine of an angle.
.- Returns:
Returns the trigonometric sine of an angle.
-
_math_sin
public static org.jvnet.localizer.Localizable _math_sin()
Keymath_sin
:Returns the trigonometric sine of an angle.
.- Returns:
Returns the trigonometric sine of an angle.
-
math_sinh
public static String math_sinh()
Keymath_sinh
:Returns the hyperbolic sine of an angle.
.- Returns:
Returns the hyperbolic sine of an angle.
-
_math_sinh
public static org.jvnet.localizer.Localizable _math_sinh()
Keymath_sinh
:Returns the hyperbolic sine of an angle.
.- Returns:
Returns the hyperbolic sine of an angle.
-
str_contains
public static String str_contains()
Keystr_contains
:Returns a boolean indicating whether s contains sub, which is either a substring or a regex pattern. For example, "food".contains("oo") returns true.
.- Returns:
Returns a boolean indicating whether s contains sub, which is either a substring or a regex pattern. For example, "food".contains("oo") returns true.
-
_str_contains
public static org.jvnet.localizer.Localizable _str_contains()
Keystr_contains
:Returns a boolean indicating whether s contains sub, which is either a substring or a regex pattern. For example, "food".contains("oo") returns true.
.- Returns:
Returns a boolean indicating whether s contains sub, which is either a substring or a regex pattern. For example, "food".contains("oo") returns true.
-
str_escape
public static String str_escape()
Keystr_escape
:Escapes s in the given escaping mode. The mode can be one of: ''html'', ''xml'', csv'', ''url'', ''javascript''. Note that quotes are required around your mode.
.- Returns:
Escapes s in the given escaping mode. The mode can be one of: ''html'', ''xml'', csv'', ''url'', ''javascript''. Note that quotes are required around your mode.
-
_str_escape
public static org.jvnet.localizer.Localizable _str_escape()
Keystr_escape
:Escapes s in the given escaping mode. The mode can be one of: ''html'', ''xml'', csv'', ''url'', ''javascript''. Note that quotes are required around your mode.
.- Returns:
Escapes s in the given escaping mode. The mode can be one of: ''html'', ''xml'', csv'', ''url'', ''javascript''. Note that quotes are required around your mode.
-
str_split_by_char_type
public static String str_split_by_char_type()
Keystr_split_by_char_type
:Returns an array of strings obtained by splitting s into groups of consecutive characters each time the characters change Unicode categories.
.- Returns:
Returns an array of strings obtained by splitting s into groups of consecutive characters each time the characters change Unicode categories.
-
_str_split_by_char_type
public static org.jvnet.localizer.Localizable _str_split_by_char_type()
Keystr_split_by_char_type
:Returns an array of strings obtained by splitting s into groups of consecutive characters each time the characters change Unicode categories.
.- Returns:
Returns an array of strings obtained by splitting s into groups of consecutive characters each time the characters change Unicode categories.
-
math_atan
public static String math_atan()
Keymath_atan
:Returns the arc tangent of an angle in the range of -PI/2 through PI/2.
.- Returns:
Returns the arc tangent of an angle in the range of -PI/2 through PI/2.
-
_math_atan
public static org.jvnet.localizer.Localizable _math_atan()
Keymath_atan
:Returns the arc tangent of an angle in the range of -PI/2 through PI/2.
.- Returns:
Returns the arc tangent of an angle in the range of -PI/2 through PI/2.
-
xml_innerxml
public static String xml_innerxml()
Keyxml_innerxml
:Returns the inner XML elements of an XML element. Does not return the text directly inside your chosen XML element - only the contents of its children. Use it in conjunction with parseXml() and select() to provide an element.
.- Returns:
Returns the inner XML elements of an XML element. Does not return the text directly inside your chosen XML element - only the contents of its children. Use it in conjunction with parseXml() and select() to provide an element.
-
_xml_innerxml
public static org.jvnet.localizer.Localizable _xml_innerxml()
Keyxml_innerxml
:Returns the inner XML elements of an XML element. Does not return the text directly inside your chosen XML element - only the contents of its children. Use it in conjunction with parseXml() and select() to provide an element.
.- Returns:
Returns the inner XML elements of an XML element. Does not return the text directly inside your chosen XML element - only the contents of its children. Use it in conjunction with parseXml() and select() to provide an element.
-
str_rpartition
public static String str_rpartition()
Keystr_rpartition
:Returns an array of strings [ a, fragment, z ] where a is the substring within s before the last occurrence of fragment, and z is the substring after the last instance of fragment. If omitFragment is true, frag is not returned.
.- Returns:
Returns an array of strings [ a, fragment, z ] where a is the substring within s before the last occurrence of fragment, and z is the substring after the last instance of fragment. If omitFragment is true, frag is not returned.
-
_str_rpartition
public static org.jvnet.localizer.Localizable _str_rpartition()
Keystr_rpartition
:Returns an array of strings [ a, fragment, z ] where a is the substring within s before the last occurrence of fragment, and z is the substring after the last instance of fragment. If omitFragment is true, frag is not returned.
.- Returns:
Returns an array of strings [ a, fragment, z ] where a is the substring within s before the last occurrence of fragment, and z is the substring after the last instance of fragment. If omitFragment is true, frag is not returned.
-
math_multinomial
public static String math_multinomial()
Keymath_multinomial
:Calculates the multinomial of one number or a series of numbers.
.- Returns:
Calculates the multinomial of one number or a series of numbers.
-
_math_multinomial
public static org.jvnet.localizer.Localizable _math_multinomial()
Keymath_multinomial
:Calculates the multinomial of one number or a series of numbers.
.- Returns:
Calculates the multinomial of one number or a series of numbers.
-
math_degrees
public static String math_degrees()
Keymath_degrees
:Converts an angle from radians to degrees.
.- Returns:
Converts an angle from radians to degrees.
-
_math_degrees
public static org.jvnet.localizer.Localizable _math_degrees()
Keymath_degrees
:Converts an angle from radians to degrees.
.- Returns:
Converts an angle from radians to degrees.
-
math_fact
public static String math_fact()
Keymath_fact
:Returns the factorial of a number, starting from 1.
.- Returns:
Returns the factorial of a number, starting from 1.
-
_math_fact
public static org.jvnet.localizer.Localizable _math_fact()
Keymath_fact
:Returns the factorial of a number, starting from 1.
.- Returns:
Returns the factorial of a number, starting from 1.
-
math_lcm
public static String math_lcm()
Keymath_lcm
:Returns the greatest common denominator of two numbers.
.- Returns:
Returns the greatest common denominator of two numbers.
-
_math_lcm
public static org.jvnet.localizer.Localizable _math_lcm()
Keymath_lcm
:Returns the greatest common denominator of two numbers.
.- Returns:
Returns the greatest common denominator of two numbers.
-
fun_type
public static String fun_type()
Keyfun_type
:Returns a string with the data type of o, such as undefined, string, number, boolean, etc.
.- Returns:
Returns a string with the data type of o, such as undefined, string, number, boolean, etc.
-
_fun_type
public static org.jvnet.localizer.Localizable _fun_type()
Keyfun_type
:Returns a string with the data type of o, such as undefined, string, number, boolean, etc.
.- Returns:
Returns a string with the data type of o, such as undefined, string, number, boolean, etc.
-
arr_in_array
public static String arr_in_array()
Keyarr_in_array
:Returns true if the array contains the desired string, and false otherwise. Will not convert data types.
.- Returns:
Returns true if the array contains the desired string, and false otherwise. Will not convert data types.
-
_arr_in_array
public static org.jvnet.localizer.Localizable _arr_in_array()
Keyarr_in_array
:Returns true if the array contains the desired string, and false otherwise. Will not convert data types.
.- Returns:
Returns true if the array contains the desired string, and false otherwise. Will not convert data types.
-
str_replace
public static String str_replace()
Keystr_replace
:Returns the string obtained by replacing the find string with the replace string in the inputted string. For example, ''The cow jumps over the moon and moos''.replace(''oo'', ''ee'') returns the string ''The cow jumps over the meen and mees''. Find can be a regex pattern. For example, ''The cow jumps over the moon and moos''.replace(/\s+/, "_") will return ''The_cow_jumps_over_the_moon_and_moos''
.- Returns:
Returns the string obtained by replacing the find string with the replace string in the inputted string. For example, ''The cow jumps over the moon and moos''.replace(''oo'', ''ee'') returns the string ''The cow jumps over the meen and mees''. Find can be a regex pattern. For example, ''The cow jumps over the moon and moos''.replace(/\s+/, "_") will return ''The_cow_jumps_over_the_moon_and_moos''
-
_str_replace
public static org.jvnet.localizer.Localizable _str_replace()
Keystr_replace
:Returns the string obtained by replacing the find string with the replace string in the inputted string. For example, ''The cow jumps over the moon and moos''.replace(''oo'', ''ee'') returns the string ''The cow jumps over the meen and mees''. Find can be a regex pattern. For example, ''The cow jumps over the moon and moos''.replace(/\s+/, "_") will return ''The_cow_jumps_over_the_moon_and_moos''
.- Returns:
Returns the string obtained by replacing the find string with the replace string in the inputted string. For example, ''The cow jumps over the moon and moos''.replace(''oo'', ''ee'') returns the string ''The cow jumps over the meen and mees''. Find can be a regex pattern. For example, ''The cow jumps over the moon and moos''.replace(/\s+/, "_") will return ''The_cow_jumps_over_the_moon_and_moos''
-
xml_selectxml
public static String xml_selectxml()
Keyxml_selectxml
:Returns an array of all the desired elements from an HTML or XML document, if the element exists. Elements are identified using the Jsoup selector syntax: https://jsoup.org/apidocs/org/jsoup/select/Selector.html.
.- Returns:
Returns an array of all the desired elements from an HTML or XML document, if the element exists. Elements are identified using the Jsoup selector syntax: https://jsoup.org/apidocs/org/jsoup/select/Selector.html.
-
_xml_selectxml
public static org.jvnet.localizer.Localizable _xml_selectxml()
Keyxml_selectxml
:Returns an array of all the desired elements from an HTML or XML document, if the element exists. Elements are identified using the Jsoup selector syntax: https://jsoup.org/apidocs/org/jsoup/select/Selector.html.
.- Returns:
Returns an array of all the desired elements from an HTML or XML document, if the element exists. Elements are identified using the Jsoup selector syntax: https://jsoup.org/apidocs/org/jsoup/select/Selector.html.
-
str_ngram_fingerprint
public static String str_ngram_fingerprint()
Keystr_ngram_fingerprint
:Returns the n-gram fingerprint of s.
.- Returns:
Returns the n-gram fingerprint of s.
-
_str_ngram_fingerprint
public static org.jvnet.localizer.Localizable _str_ngram_fingerprint()
Keystr_ngram_fingerprint
:Returns the n-gram fingerprint of s.
.- Returns:
Returns the n-gram fingerprint of s.
-
math_acos
public static String math_acos()
Keymath_acos
:Returns the arc cosine of an angle, in the range 0 through PI.
.- Returns:
Returns the arc cosine of an angle, in the range 0 through PI.
-
_math_acos
public static org.jvnet.localizer.Localizable _math_acos()
Keymath_acos
:Returns the arc cosine of an angle, in the range 0 through PI.
.- Returns:
Returns the arc cosine of an angle, in the range 0 through PI.
-
math_atan2
public static String math_atan2()
Keymath_atan2
:Converts rectangular coordinates (n1, n2) to polar (r, theta). Returns number theta.
.- Returns:
Converts rectangular coordinates (n1, n2) to polar (r, theta). Returns number theta.
-
_math_atan2
public static org.jvnet.localizer.Localizable _math_atan2()
Keymath_atan2
:Converts rectangular coordinates (n1, n2) to polar (r, theta). Returns number theta.
.- Returns:
Converts rectangular coordinates (n1, n2) to polar (r, theta). Returns number theta.
-
arr_reverse
public static String arr_reverse()
Keyarr_reverse
:Reverses array a.
.- Returns:
Reverses array a.
-
_arr_reverse
public static org.jvnet.localizer.Localizable _arr_reverse()
Keyarr_reverse
:Reverses array a.
.- Returns:
Reverses array a.
-
fun_to_date
public static String fun_to_date()
Keyfun_to_date
:Returns the inputted object converted to a date object. Without arguments, it returns the ISO 8601 extended format. With arguments, you can control the output format. With monthFirst: set false if the date is formatted with the day before the month. With formatN: attempt to parse the date using an ordered list of possible formats. Supply formats based on the SimpleDateFormat syntax: <a href="http://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html">SimpleDateFormat</a>.
.- Returns:
Returns the inputted object converted to a date object. Without arguments, it returns the ISO 8601 extended format. With arguments, you can control the output format. With monthFirst: set false if the date is formatted with the day before the month. With formatN: attempt to parse the date using an ordered list of possible formats. Supply formats based on the SimpleDateFormat syntax: <a href="http://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html">SimpleDateFormat</a>.
-
_fun_to_date
public static org.jvnet.localizer.Localizable _fun_to_date()
Keyfun_to_date
:Returns the inputted object converted to a date object. Without arguments, it returns the ISO 8601 extended format. With arguments, you can control the output format. With monthFirst: set false if the date is formatted with the day before the month. With formatN: attempt to parse the date using an ordered list of possible formats. Supply formats based on the SimpleDateFormat syntax: <a href="http://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html">SimpleDateFormat</a>.
.- Returns:
Returns the inputted object converted to a date object. Without arguments, it returns the ISO 8601 extended format. With arguments, you can control the output format. With monthFirst: set false if the date is formatted with the day before the month. With formatN: attempt to parse the date using an ordered list of possible formats. Supply formats based on the SimpleDateFormat syntax: <a href="http://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html">SimpleDateFormat</a>.
-
-