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
|
java.lang.String |
getCompilerName()
Get the (local) name of a class that can be used to generate bytecode for this
system function
|
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.
|
dependsOnContextItem, dynamicCall, equals, export, exportAdditionalArguments, exportAttributes, fixArguments, getArity, getCardinality, getContextNode, getDescription, getDetails, getErrorCodeForTypeErrors, getFunctionItemType, getFunctionName, getIntegerBounds, getNetCost, getOperandRoles, getRequiredType, getResultItemType, getResultItemType, getRetainedStaticContext, getSpecialProperties, getStaticBaseUriString, getStreamerName, importAttributes, isTrustedResultType, makeCall, makeFunction, makeFunctionCall, makeOptimizedFunctionCall, resultIfEmpty, setArity, setDetails, setRetainedStaticContext, supplyTypeInformation
atomize, deepEquals, effectiveBooleanValue, getAnnotations, getStringValue, getStringValueCS, isArray, isMap, makeNewContext, simplify, typeCheck
getLength, head, isStreamed, 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 java.lang.String getCompilerName()
SystemFunction
getCompilerName
in class SystemFunction
Copyright (c) 2004-2018 Saxonica Limited. All rights reserved.