public class StringFunctions extends AbstractFunctionHandler
| 限定符和类型 | 字段和说明 |
|---|---|
static String |
HANDLER_ID |
q| 构造器和说明 |
|---|
StringFunctions() |
| 限定符和类型 | 方法和说明 |
|---|---|
List |
grep(File f,
String s) |
List |
grep(File f,
String s,
boolean ignoreCase) |
double |
lastIndexOf(Object o,
Object i) |
double |
length(Object o) |
boolean |
regexp(Object o,
String re) |
boolean |
regexp(Object o,
String re,
String instName) |
List |
rgrep(File f,
String regexp) |
List |
rgrep(File f,
String regexp,
String instName) |
String |
subStr(Object o,
double f)
Return a substring of the passed in object (in a string form).
|
String |
subStr(Object o,
double f,
double t) |
String |
trim(Object o,
Object v) |
setQuerypublic boolean regexp(Object o, String re) throws QueryExecutionException
public boolean regexp(Object o, String re, String instName) throws QueryExecutionException
public List grep(File f, String s, boolean ignoreCase) throws QueryExecutionException
public List rgrep(File f, String regexp, String instName) throws QueryExecutionException
public List rgrep(File f, String regexp) throws QueryExecutionException
public List grep(File f, String s) throws QueryExecutionException
public String subStr(Object o, double f)
subStr(Object,double,double)
for the full details since this is just a thin-wrapper around that method with the t
parameter set to -1.o - The object to convert to a string and return the substring.f - The start index. If this is set to 0 then the entire string is returned.public double length(Object o)
Copyright © 2021. All rights reserved.