code: def tokenize_string(text, delimiters=None):
      r
      if delimiters is None:
          delimiters = ALL_TOKENS
      result = TokenWithPosition('', text.position)
      for c in text:
          if c == '\\' and str(text.peek()) in delimiters and str(c + text.peek()) not in delimiters:
              c += next(text)
          elif str(c) in delimiters:  # assumes all tokens are single characters
              text.backward(1)
              return result
          result += c
          if text.peek((0, 2)) == '\\\\':
              result += text.forward(2)
          if text.peek((0, 2)) == '\n\n':
              result += text.forward(2)
              return result
      return result
docs: r"""Process a string of text
  
      :param Buffer text: iterator over line, with current position
      :param Union[None,iterable,str] delimiters: defines the delimiters
  
      >>> tokenize_string(Buffer('hello'))
      'hello'
      >>> b = Buffer(r'hello again\command')
      >>> tokenize_string(b)
      'hello again'
      >>> print(b.peek())
      \
      >>> print(tokenize_string(Buffer(r'0 & 1 \\\command')))
      0 & 1 \\