A MicroPython-optimized port of wcwidth for measuring wide Unicode character widths in terminal output.
mp_wcwidth is a simplified, size-optimized port of the wcwidth library for MicroPython and embedded systems. It provides accurate width measurement for Unicode characters, including wide CJK characters and emoji, which is essential for proper text alignment and display in terminal applications.
wcwidth() function returns width of single characters (1, 2, 0, or -1 for control).wcswidth() function calculates total display width of strings.The project prioritizes minimal footprint and MicroPython compatibility, removing multi-version support and complex caching to achieve a 90% size reduction while retaining core functionality for embedded use.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.