class_docstr: shared implementation for filesystem path objects.
docstr: return a string which is the relative part of the path
  to the given 'relpath'.
docstr_tok: ["return","a","string","which","is","the","relative","part","of","the","path","to","the","given","'relpath","'","."]
code: def relto(self, relpath):
      """return a string which is the relative part of the path
      to the given 'relpath'.
      """
      if not isinstance(relpath, (str, PathBase)):
          raise TypeError(
              "%r: not a string or path object" % (relpath,)
          )
      strrelpath = str(relpath)
      if strrelpath and strrelpath[-1] != self.sep:
          strrelpath += self.sep
      # assert strrelpath[-1] == self.sep
      # assert strrelpath[-2] != self.sep
      strself = self.strpath
      if sys.platform == "win32" or getattr(os, "_name", None) == "nt":
          if os.path.normcase(strself).startswith(
              os.path.normcase(strrelpath)
          ):
              return strself[len(strrelpath) :]
      elif strself.startswith(strrelpath):
          return strself[len(strrelpath) :]
      return ""
  
imports: import warnings
  import os
  import sys
  import posixpath
  import fnmatch
  import py
label_desc: Use image node_id 16 for calling the PathBase obj's underlying member method code with example usage: obj.relto(relpath) and returns: str, strself, strself