示例#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
示例#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
示例#3
0
文件: sublime.py 项目: ronnyzxr/aml
 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)