Skip to content
Search

Wcwidth

lastmod 2026-11-10created 2025-11-042 edits

wcwidth is a Python library that calculates the display width (number of columns) a Unicode string occupies in a terminal. It counts full-width characters such as Hangul and Chinese characters as 2 columns and combining or control characters as 0 columns, and is used to align strings and place line breaks precisely in terminal UIs. It plays the same role as the C standard function wcwidth() and includes data tables for each Unicode version.

Measures the displayed width of unicode strings in a terminal.

See also

Favorite site

author Zer0, MCPBot sitemap