Skip to content

p-ranav/unicode_display_width

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

display_width

Cross-platform single-header library to calculate the display width of UTF-8 strings.

Quick Start

#include <unicode/display_width.hpp>

int main() {
    const std::string input = u8"Hello, world!";
    
    // Calculate display width
    const auto result = unicode::display_width(input);
    
    // Verify result
    std::cout << "Input  : " << input << "\n";
    std::cout << "Output : " << std::string(result, '|') << "\n";
    std::cout << "Width  : " << result << "\n\n";
}

hello_world

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy