package
0.0.0-20220916201900-54282bc8ea0f
Repository: https://github.com/jf-tech/omniparserlegacy.git
Documentation: pkg.go.dev

# Functions

ContainsPattern checks if any of 'strs' matches the given regex pattern, returns "true" if yes, and "false" if no.
Eval evaluates a given expression with input params and return the result in string.
External looks up an external property value by name and fails if not found.
Floor parses 'valueStr' in as a float64 and then floors/truncates it to the specified decimal places.
IfElse does a 'if-elseif-elseif-...-else' pattern check and returns the value that meets the condition.
IsEmpty returns "true" if 'str' is empty; false if 'str' isn't.
Replace replaces in 's' all the substrings that matches 'regexStr' with 'replStr'.
RetrieveBySplit splits a 'str' by 'sep' and returns the 'indexStr'-th part.
RowSkip checks if a 'value' matches 'skipRegex' pattern, and return a special error code NonErrorRecordSkipped to indicate to omniparser '1.0' to skip processing a record, if the pattern matches.
RSubstring extracts a part of a 'str' from 'startIndex' from the right end of the string with length equal to 'lengthStr'.
SplitIntoJSONArray splits an 's' by 'sep' and returns the resulting array of parts in a JSON string.
StrEqualAny returns true if the 's' is equal to any of the strings specified by 'others'.
Substring extracts a part of a 'str' from 'startIndex' with 'lengthStr'.
SwitchByPattern tests a value against a number of patterns (by regex pattern match) and returns the matched value; if nothing matches, the last default value is returned.
SwitchFunc tests a 'value' against a number of cases (by string literal comparison) and returns the matched value; if nothing matches, the last default value is returned.

# Variables

OmniV10CustomFuncs contains all custom funcs supported by omniparser '1.0'.
OmniV10OnlyCustomFuncs contains omniparser '1.0' specific custom funcs.