def nextstring(quot)
      c = buf = ""
      while true
	c = self.nextchar()
	case c
	when /\0|\n\r/
	  raise "Unterminated string"
	when "\\"
	  chr = self.nextchar()
	  case chr
	  when 'b'
	    buf << "\b"
	  when 't'
	    buf << "\t"
	  when 'n'
	    buf << "\n"
	  when 'f'
	    buf << "\f"
	  when 'r'
	    buf << "\r"
	  when 'u'
	    buf << utf8str(Integer("0x" + self.nextchars(4)))
	  else
	    buf << chr
	  end
	else
	  return(buf) if (c == quot)
	  buf << c
	end
      end
    end
def nextstring(quot)
      c = buf = ""
      while true
	c = self.nextchar()
	case c
	when /\0|\n\r/
	  raise "Unterminated string"
	when "\\"
	  chr = self.nextchar()
	  case chr
	  when 'b'
	    buf << "\b"
	  when 't'
	    buf << "\t"
	  when 'n'
	    buf << "\n"
	  when 'f'
	    buf << "\f"
	  when 'r'
	    buf << "\r"
	  when 'u'
	    buf << utf8str(Integer("0x" + self.nextchars(4)))
	  else
	    buf << chr
	  end
	else
	  return(buf) if (c == quot)
	  buf << c
	end
      end
    end
Reads the next string, given a quote character (usually ' or ")
 =====Parameters
 +quot+: the next matching quote character to use