public class CustomFunctions extends Object
| Constructor and Description |
|---|
CustomFunctions() |
| Modifier and Type | Method and Description |
|---|---|
static BigDecimal |
epoch(EvaluationContext ctx,
Object datetime)
Converts the given date to the number of nanoseconds since January 1st, 1970 UTC
|
static String |
field(EvaluationContext ctx,
Object text,
Object index,
Object delimiter)
Reference a field in string separated by a delimiter
|
static String |
first_word(EvaluationContext ctx,
Object text)
Returns the first word in the given text string
|
static String |
format_date(EvaluationContext ctx,
Object text)
Formats a date according to the default org format
|
static String |
format_location(EvaluationContext ctx,
Object text)
Takes a single parameter (administrative boundary as a string) and returns the name of the leaf boundary
|
static String |
percent(EvaluationContext ctx,
Object number)
Formats a number as a percentage
|
static String |
read_digits(EvaluationContext ctx,
Object text)
Formats digits in text for reading in TTS
|
static String |
regex_group(EvaluationContext ctx,
Object text,
Object pattern,
Object groupNum)
Tries to match the text with the given pattern and returns the value of matching group
|
static String |
remove_first_word(EvaluationContext ctx,
Object text)
Removes the first word from the given text string
|
static int |
word_count(EvaluationContext ctx,
Object text,
Object bySpaces)
Returns the number of words in the given text string
|
static String |
word_slice(EvaluationContext ctx,
Object text,
Object start,
Object stop,
Object bySpaces)
Extracts a substring spanning from start up to but not-including stop
|
static String |
word(EvaluationContext ctx,
Object text,
Object number,
Object bySpaces)
Extracts the nth word from the given text string
|
public static String field(EvaluationContext ctx, Object text, Object index, Object delimiter)
public static String first_word(EvaluationContext ctx, Object text)
public static String percent(EvaluationContext ctx, Object number)
public static BigDecimal epoch(EvaluationContext ctx, Object datetime)
public static String read_digits(EvaluationContext ctx, Object text)
public static String remove_first_word(EvaluationContext ctx, Object text)
public static String word(EvaluationContext ctx, Object text, Object number, Object bySpaces)
public static int word_count(EvaluationContext ctx, Object text, Object bySpaces)
public static String word_slice(EvaluationContext ctx, Object text, Object start, Object stop, Object bySpaces)
public static String format_date(EvaluationContext ctx, Object text)
public static String format_location(EvaluationContext ctx, Object text)
public static String regex_group(EvaluationContext ctx, Object text, Object pattern, Object groupNum)
Copyright © 2018. All rights reserved.