comparison mercurial/utils/stringutil.py @ 49284:d44e3c45f0e4

py3: replace `pycompat.xrange` by `range`
author Manuel Jacob <me@manueljacob.de>
date Sun, 29 May 2022 15:17:27 +0200
parents 75794847ef62
children bbbb5213d043
comparison
equal deleted inserted replaced
49283:44b26349127b 49284:d44e3c45f0e4
748 """ 748 """
749 749
750 def _cutdown(self, ucstr, space_left): 750 def _cutdown(self, ucstr, space_left):
751 l = 0 751 l = 0
752 colwidth = encoding.ucolwidth 752 colwidth = encoding.ucolwidth
753 for i in pycompat.xrange(len(ucstr)): 753 for i in range(len(ucstr)):
754 l += colwidth(ucstr[i]) 754 l += colwidth(ucstr[i])
755 if space_left < l: 755 if space_left < l:
756 return (ucstr[:i], ucstr[i:]) 756 return (ucstr[:i], ucstr[i:])
757 return ucstr, b'' 757 return ucstr, b''
758 758