equal
deleted
inserted
replaced
399 |
399 |
400 def getcols(s, start, c): |
400 def getcols(s, start, c): |
401 # type: (bytes, int, int) -> bytes |
401 # type: (bytes, int, int) -> bytes |
402 """Use colwidth to find a c-column substring of s starting at byte |
402 """Use colwidth to find a c-column substring of s starting at byte |
403 index start""" |
403 index start""" |
404 for x in pycompat.xrange(start + c, len(s)): |
404 for x in range(start + c, len(s)): |
405 t = s[start:x] |
405 t = s[start:x] |
406 if colwidth(t) == c: |
406 if colwidth(t) == c: |
407 return t |
407 return t |
408 raise ValueError('substring not found') |
408 raise ValueError('substring not found') |
409 |
409 |