|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jaxen.function.SubstringAfterFunction
public class SubstringAfterFunction
4.2 string substring-after(string,string)
The substring-after function returns the substring of the first argument string that follows the first occurrence of the second argument string in the first argument string, or the empty string if the first argument string does not contain the second argument string. For example, substring-after("1999/04/01","/") returns 04/01, and substring-after("1999/04/01","19") returns 99/04/01.
Constructor Summary | |
---|---|
SubstringAfterFunction()
Create a new SubstringAfterFunction object. |
Method Summary | |
---|---|
Object |
call(Context context,
List args)
Returns the part of the string-value of the first item in args
that follows the string-value of the second item in args ;
or the empty string if the second string is not a substring of the first string. |
static String |
evaluate(Object strArg,
Object matchArg,
Navigator nav)
Returns the part of strArg that follows the first occurence
of matchArg ; or the empty string if the
strArg does not contain matchArg |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SubstringAfterFunction()
SubstringAfterFunction
object.
Method Detail |
---|
public Object call(Context context, List args) throws FunctionCallException
args
that follows the string-value of the second item in args
;
or the empty string if the second string is not a substring of the first string.
call
in interface Function
context
- the context at the point in the
expression when the function is calledargs
- a list that contains two items
String
containing that
part of the string-value of the first item in args
that comes before the string-value of the second item in args
FunctionCallException
- if args
does not have length twopublic static String evaluate(Object strArg, Object matchArg, Navigator nav)
strArg
that follows the first occurence
of matchArg
; or the empty string if the
strArg
does not contain matchArg
strArg
- the string from which the substring is extractedmatchArg
- the string that marks the boundary of the substringnav
- the Navigator
used to calculate the string-values of
the first two arguments
String
containing
the part of strArg
that precedes the first occurence
of matchArg
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |