summaryrefslogtreecommitdiff
path: root/src/misc.cpp
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2025-04-16 01:53:50 +0100
committerSadie Powell <sadie@witchery.services>2025-04-16 01:53:50 +0100
commitad0b4d1aa007816c4be004a87b0fcafd2b0eb227 (patch)
tree1244290e1b37e4247db9adcbd1911f00e5dccc03 /src/misc.cpp
parent74e9a9d2feb3690dc06a310e0477cd6f17e25fab (diff)
Rename TextSplitter to LineWrapper.
Diffstat (limited to 'src/misc.cpp')
-rw-r--r--src/misc.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/misc.cpp b/src/misc.cpp
index 7b2759f90..0c9caf06c 100644
--- a/src/misc.cpp
+++ b/src/misc.cpp
@@ -277,24 +277,24 @@ void HelpWrapper::SendTo(CommandSource &source)
const auto max_length = Config->GetBlock("options").Get<size_t>("linelength", "100") - longest - 8;
for (const auto &[entry_name, entry_desc] : entries)
{
- TextSplitter splitter(Language::Translate(source.nc, entry_desc.c_str()), max_length);
+ LineWrapper lw(Language::Translate(source.nc, entry_desc.c_str()), max_length);
Anope::string line;
- if (splitter.GetLine(line))
+ if (lw.GetLine(line))
source.Reply(" %-*s %s", (int)longest, entry_name.c_str(), line.c_str());
- while (splitter.GetLine(line))
+ while (lw.GetLine(line))
source.Reply(" %-*s %s", (int)longest, "", line.c_str());
}
};
-TextSplitter::TextSplitter(const Anope::string &t, size_t ml)
+LineWrapper::LineWrapper(const Anope::string &t, size_t ml)
: max_length(ml ? ml : Config->GetBlock("options").Get<size_t>("linelength", "100"))
, text(t)
{
}
-bool TextSplitter::GetLine(Anope::string &out)
+bool LineWrapper::GetLine(Anope::string &out)
{
out.clear();
if (text.empty())