Number of character cells used by string

前端 未结 6 769
离开以前
离开以前 2020-12-02 14:56

I have a program that outputs a textual table using UTF-8 strings, and I need to measure the number of monospaced character cells used by a string so I can align it properly

6条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-02 15:19

    You can also use glib which makes your live much easier when dealing with UTF-8. glib reference docs

提交回复
热议问题