def substr(self, x): if isinstance(x, Region): return sublime_api.view_cached_substr(self.view_id, x.a, x.b) else: s = sublime_api.view_cached_substr(self.view_id, x, x + 1) # S2 backwards compat if len(s) == 0: return "\x00" else: return s
def substr(self, x): if isinstance(x, Region): return sublime_api.view_cached_substr(self.view_id, x.a, x.b) else: return sublime_api.view_cached_substr(self.view_id, x, x + 1)