{
    "mode": "perldoc",
    "parameter": "Text::CharWidth",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/Text%3A%3ACharWidth/json",
    "generated": "2026-06-13T20:05:09Z",
    "synopsis": "use Text::CharWidth qw(mbwidth mbswidth mblen);\nmbwidth(string);\nmbswidth(string);\nmblen(string);",
    "sections": {
        "NAME": {
            "content": "Text::CharWidth - Get number of occupied columns of a string on terminal\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "use Text::CharWidth qw(mbwidth mbswidth mblen);\nmbwidth(string);\nmbswidth(string);\nmblen(string);\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "This module supplies features similar as wcwidth(3) and wcswidth(3) in C language.\n\nCharacters have its own width on terminal depending on locale. For example, ASCII characters\noccupy one column per character, east Asian fullwidth characters (like Hiragana or Han\nIdeograph) occupy two columns per character, and combining characters (apperaring in ISO-8859-11\nThai, Unicode, and so on) occupy zero columns per character. mbwidth() gives the width of the\nfirst character of the given string and mbswidth() gives the width of the whole given string.\n\nThe names of mbwidth and mbswidth came from \"multibyte\" versions of wcwidth and wcswidth which\nare \"wide character\" versions.\n\n*mblen(string)* returns number of bytes of the first character of the string. Please note that a\ncharacter may consist of multiple bytes in multibyte encodings such as UTF-8, EUC-JP, EUC-KR,\nGB2312, or Big5.\n\n*mbwidth(string)* returns the width of the first character of the string. *mbswidth(string)*\nreturns the width of the whole string.\n\nParameters are to be given in locale encodings, not always in UTF-8.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "",
            "subsections": [
                {
                    "name": "locale",
                    "content": ""
                }
            ]
        },
        "AUTHOR": {
            "content": "Tomohiro KUBOTA, <kubota@debian.org>\n",
            "subsections": []
        },
        "COPYRIGHT AND LICENSE": {
            "content": "Copyright 2003 by Tomohiro KUBOTA\n\nThis library is free software; you can redistribute it and/or modify it under the same terms as\nPerl itself.\n",
            "subsections": []
        }
    },
    "summary": "Text::CharWidth - Get number of occupied columns of a string on terminal",
    "flags": [],
    "examples": [],
    "see_also": []
}