code: def str_display_width(s):
      '''
          from elist.utils import *
          str_display_width('a')
          str_display_width('去')
      '''
      s= str(s)
      width = 0
      len = s.__len__()
      for i in range(0,len):
          sublen = s[i].encode().__len__()
          sublen = int(sublen/2 + 1/2)
          width = width + sublen
      return(widthf str_display_width(s):
      '''
          from elist.utils import *
          str_display_width('a')
          str_display_width('去')
      '''
      s= str(s)
      width = 0
      len = s.__len__()
      for i in range(0,len):
          sublen = s[i].encode().__len__()
          sublen = int(sublen/2 + 1/2)
          width = width + sublen
      return(width)
docs: from elist.utils import *
          str_display_width('a')
          str_display_width('去')