Class Substring

    • Constructor Detail

      • Substring

        public Substring()
    • Method Detail

      • substring

        public static UnicodeString substring​(StringValue sv,
                                              NumericValue start)
        Implement the substring function with two arguments.
        Parameters:
        sv - the string value
        start - the numeric offset (1-based) of the first character to be included in the result (if not an integer, the XPath rules apply)
        Returns:
        the substring starting at this position.
      • substring

        public static UnicodeString substring​(StringValue sv,
                                              NumericValue start,
                                              NumericValue len)
        Implement the substring function with three arguments.
        Parameters:
        sv - the string value
        start - 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)
        Returns:
        the substring starting at this position.
      • call

        public ZeroOrOne call​(XPathContext context,
                              Sequence[] arguments)
                       throws XPathException
        Evaluate the expression
        Specified by:
        call in interface Callable
        Specified by:
        call in interface Function
        Parameters:
        context - the dynamic evaluation context
        arguments - the values of the arguments, supplied as Sequences
        Returns:
        the result of the evaluation, in the form of a Sequence
        Throws:
        XPathException - if a dynamic error occurs during the evaluation of the expression
      • getCompilerName

        public java.lang.String getCompilerName()
        Description copied from class: SystemFunction
        Get the (local) name of a class that can be used to generate bytecode for this system function
        Overrides:
        getCompilerName in class SystemFunction
        Returns:
        the name of a bytecode generation class, or null if there is no bytecode support for this function