module Starscope::Exportable

def cscope_plaintext(line, start, stop)

def cscope_plaintext(line, start, stop)
  ret = line.slice(start, stop - start)
  ret.lstrip! if start == 0
  ret.rstrip! if stop == line.length
  ret.gsub!(/\s+/, ' ')
  ret.empty? ? ' ' : strip_unicode(ret)
rescue ArgumentError
  # invalid utf-8 byte sequence in the line, oh well
  strip_unicode(line)
end