Skip to content

Add support for unicode width aligned #2033

Closed
@mrbeardad

Description

@mrbeardad
  • version: 7.1.2
  • problem: fmt::format does not take into acount width of characters.

code

    std::cout << fmt::format("{:-<10}{}", "你好", "世界") << std::endl;
    std::cout << fmt::format("{:-<10}{}", "hello", "world") << std::endl;

expected

你好------世界
hello-----world

Actual results

你好--------世界
hello-----world

and is 2 columns character. The source code of neovim may help you to implement this function.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions