/
githubmirror
/
nbs
Обзор
Документация
Войти
/
githubmirror
/
nbs
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
library/cpp/getopt/small/wrap.h
16 строк
663 B
qkrorlqr
Initial NBS OpenSource export
28 апр 2023, 21:54
28 апр 2023, 21:54
783a858
Код
Авторство
О чём код?
#pragma once #include <util/generic/fwd.h> #include <util/generic/strbuf.h> namespace NLastGetopt { /** * Split text to multiple lines so that each line fits the given width. * Can work with UTF8, understands ANSI escape codes. * * @param indent will print this string after each newline. * @param lastLineLen output: will set to number of unicode codepoints in the last printed line. * @param hasParagraphs output: will set to true if there are two consecutive newlines in the text. */ TString Wrap(ui32 width, TStringBuf text, TStringBuf indent = "", size_t* lastLineLen = nullptr, bool* hasParagraphs = nullptr); }