code: def str_between(str_, startstr, endstr):
      r
      if startstr is None:
          startpos = 0
      else:
          startpos = str_.find(startstr) + len(startstr)
      if endstr is None:
          endpos = None
      else:
          endpos = str_.find(endstr)
          if endpos == -1:
              endpos = None
      newstr = str_[startpos:endpos]
      return newstr
docs: r"""
      gets substring between two sentianl strings
  
      Example:
          >>> # DISABLE_DOCTEST
          >>> from utool.util_str import *  # NOQA
          >>> import utool as ut
          >>> str_ = '\n        INSERT INTO vsone(\n'
          >>> startstr = 'INSERT'
          >>> endstr = '('
          >>> result = str_between(str_, startstr, endstr)
          >>> print(result)