Exemplo n.º 1
0
 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
Exemplo n.º 2
0
 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
Exemplo n.º 3
0
 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)