Skip to main content

clamp_utf8

Function clamp_utf8 

Source
pub fn clamp_utf8(value: &str, max_bytes: usize) -> String
Expand description

Clamp text to max_bytes of UTF-8, ending a clamped result with the truncation marker on a character boundary.