lib/parslet/source.rb
# Returns how many chars there are between current position and the 
# string given. If the string given doesn't occur in the source, then 
# the remaining chars (#chars_left) are returned. 
#
# @return [Fixnum] count of chars until str or #chars_left
#
Returns how many chars there are between current position and the
string given. If the string given doesn't occur in the source, then
the remaining chars (#chars_left) are returned.
Returns how many chars there are between current position and the string given . If the string given doesn ' t occur in the source then the remaining chars ( #chars_left ) are returned .
def chars_until str
      slice_str = @str.check_until(Regexp.new(Regexp.escape(str)))
      return chars_left unless slice_str
      return slice_str.size - str.size
    end
def chars_until str slice_str = @str . check_until ( Regexp . new ( Regexp . escape ( str ) ) ) return chars_left unless slice_str return slice_str . size - str . size end
Returns how many chars there are between current position and the
string given.
Returns how many chars there are between current position and the string given .
count of chars until str or #chars_left
count of chars until str or #chars_left
Fixnum
str
<not_specific>