Skip to content
This repository was archived by the owner on Jun 23, 2022. It is now read-only.

make padding correct when it contains CJK character #26

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

ch-linghu
Copy link

with this new method

Chinese string padding result:

 +--------+--------+--------+
 | 列1    | 列2    | 列3    |
 +========+========+========+
 | 单元11 | 单元12 | 单元13 |
 +--------+--------+--------+
 | 单元21 | 单元22 | 单元23 |
 +--------+--------+--------+
 | 单元31 | 单元32 | 单元33 |
 +--------+--------+--------+

(NOTE: it may look strange but the number of spaces are correct)

English string padding result:

   +--------+----------+------+
   | nombre | apellido | edad |
   +========+==========+======+
   | pepe   | zarate   | 28   |
   +--------+----------+------+
   | toto   | garcia   | 29   |
   +--------+----------+------+

@rpuntaie rpuntaie mentioned this pull request Feb 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant