Reads characters until pattern s is found

Property definitions

parser_base $ StringProcessor :: ignore_until
	# Reads characters until pattern `s` is found
	protected fun ignore_until(s: String): Int do
		if s.length == 0 then return _pos
		var srclen = _len
		var p = _pos
		if p >= srclen then return -1
		loop
			var c = s[0]
			var src_c = src[p]
			while src_c != c do
				p += 1
				if p >= srclen then
					_pos = p
					return -1
				end
				if src_c == '\n' then
					line += 1
					line_start= pos
				end
				src_c = src[p]
			end
			var relpos = p
			var fnd = true
			for i in s do
				if relpos >= srclen then
					fnd = false
					break
				end
				if src[relpos] != i then
					p += 1
					fnd = false
					break
				end
				relpos += 1
			end
			if fnd then
				_pos = p
				return p
			end
		end
	end
lib/parser_base/parser_base.nit:62,2--102,4