str stats для строк
Собирает статистику количества слов в тексте.
Сигнатура
> str stats {flags}
Типы входных и выходных данных:
| вход | выход |
|---|---|
| строка | запись |
Примеры
Подсчитывает количество слов в строке.
> "There are seven words in this sentence" | str stats ╭───────────────┬────╮ │ lines │ 1 │ │ words │ 7 │ │ bytes │ 38 │ │ chars │ 38 │ │ graphemes │ 38 │ │ unicode-width │ 38 │ ╰───────────────┴────╯
Подсчитывает символы Unicode.
> '今天天气真好' | str stats ╭───────────────┬────╮ │ lines │ 1 │ │ words │ 6 │ │ bytes │ 18 │ │ chars │ 6 │ │ graphemes │ 6 │ │ unicode-width │ 12 │ ╰───────────────┴────╯
Корректно подсчитывает символы Unicode в строке.
> "Amélie Amelie" | str stats ╭───────────────┬────╮ │ lines │ 1 │ │ words │ 2 │ │ bytes │ 15 │ │ chars │ 14 │ │ graphemes │ 13 │ │ unicode-width │ 13 │ ╰───────────────┴────╯
Copyright © 2019–2026 The Nushell Project DevelopersLicensed under the MIT License.
https://www.nushell.sh/commands/docs/str_stats.html