public class Substring extends SystemFunction implements Callable
Constructor and Description |
---|
Substring() |
Modifier and Type | Method and Description |
---|---|
ZeroOrOne<StringValue> |
call(XPathContext context,
Sequence[] arguments)
Evaluate the expression
|
ExpressionCompiler |
getExpressionCompiler()
Return the compiler of the Substring expression
|
static UnicodeString |
substring(StringValue sv,
NumericValue start)
Implement the substring function with two arguments.
|
static UnicodeString |
substring(StringValue sv,
NumericValue start,
NumericValue len)
Implement the substring function with three arguments.
|
Expression |
typeCheckCaller(FunctionCall caller,
ExpressionVisitor visitor,
ContextItemStaticInfo contextInfo)
Type-check the expression.
|
equals, export, exportAttributes, getArity, getCardinality, getContextNode, getDescription, getDetails, getErrorCodeForTypeErrors, getFunctionItemType, getFunctionName, getIntegerBounds, getOperandRoles, getRequiredType, getResultItemType, getResultItemType, getRetainedStaticContext, getSpecialProperties, getStaticBaseUriString, getStreamingAdjunct, importAttributes, makeCall, makeFunction, makeFunctionCall, makeOptimizedFunctionCall, resultIfEmpty, setArity, setDetails, setRetainedStaticContext, supplyTypeInformation
atomize, deepEquals, effectiveBooleanValue, getStringValue, getStringValueCS, isArray, isMap, optimize, simplify, typeCheck
getLength, head, itemAt, iterate, reduce, subsequence
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getLength, head, itemAt, reduce, subsequence
public Expression typeCheckCaller(FunctionCall caller, ExpressionVisitor visitor, ContextItemStaticInfo contextInfo) throws XPathException
typeCheckCaller
in class SystemFunction
XPathException
public static UnicodeString substring(StringValue sv, NumericValue start)
sv
- the string valuestart
- the numeric offset (1-based) of the first character to be included in the result
(if not an integer, the XPath rules apply)public static UnicodeString substring(StringValue sv, NumericValue start, NumericValue len)
sv
- the string valuestart
- the numeric offset (1-based) of the first character to be included in the result
(if not an integer, the XPath rules apply)len
- the length of the required substring (again, XPath rules apply)public ZeroOrOne<StringValue> call(XPathContext context, Sequence[] arguments) throws XPathException
call
in interface Callable
call
in interface Function
context
- the dynamic evaluation contextarguments
- the values of the arguments, supplied as SequencesXPathException
- if a dynamic error occurs during the evaluation of the expressionpublic ExpressionCompiler getExpressionCompiler()
getExpressionCompiler
in class SystemFunction
Copyright (c) 2004-2014 Saxonica Limited. All rights reserved.