class Dentaku::AST::StringFunctions::Find

def self.max_param_count

def self.max_param_count
  2
end

def self.min_param_count

def self.min_param_count
  2
end

def initialize(*args)

def initialize(*args)
  super
  @needle, @haystack = *@args
end

def type

def type
  :numeric
end

def value(context = {})

def value(context = {})
  needle = @needle.value(context)
  needle = needle.to_s unless needle.is_a?(Regexp)
  haystack = @haystack.value(context).to_s
  pos = haystack.index(needle)
  pos && pos + 1
end