mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-31 04:57:45 +00:00
more: add todo for unicode width
This commit is contained in:
parent
40ee9023e8
commit
9d17c1fddf
1 changed files with 1 additions and 0 deletions
|
@ -316,6 +316,7 @@ fn break_buff(buff: &str, cols: usize) -> Vec<String> {
|
||||||
fn break_line(mut line: &str, cols: usize) -> Vec<String> {
|
fn break_line(mut line: &str, cols: usize) -> Vec<String> {
|
||||||
let breaks = (line.len() / cols).saturating_add(1);
|
let breaks = (line.len() / cols).saturating_add(1);
|
||||||
let mut lines = Vec::with_capacity(breaks);
|
let mut lines = Vec::with_capacity(breaks);
|
||||||
|
// TODO: Use unicode width instead of the length in bytes.
|
||||||
if line.len() < cols {
|
if line.len() < cols {
|
||||||
lines.push(line.to_string());
|
lines.push(line.to_string());
|
||||||
return lines;
|
return lines;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue