class Gammo::XPath::AST::Function::SubstringAfter
@!visibility private
Public Instance Methods
evaluate(context)
click to toggle source
# File lib/gammo/xpath/ast/function.rb, line 150 def evaluate(context) s1 = arguments[0].evaluate(context).to_s s2 = arguments[1].evaluate(context.clone).to_s return string '' if s2.empty? return string '' unless pos = s1.rindex(s2) string s1[(pos + s2.length)..-1] end