mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
- Added DEVELOPERS file describing high-level code layout.
- Removed unused library.h file. - Removed unused std::wstring Unicode variants.
This commit is contained in:
parent
4825b37df5
commit
4549af6b84
6 changed files with 23 additions and 79 deletions
21
src/text.cpp
21
src/text.cpp
|
@ -99,13 +99,6 @@ std::string trimLeft (const std::string& in, const std::string& t /*= " "*/)
|
|||
return out.erase (0, in.find_first_not_of (t));
|
||||
}
|
||||
|
||||
// UNICODE safe
|
||||
std::wstring trimLeft (const std::wstring& in, const std::wstring& t /*= L" "*/)
|
||||
{
|
||||
std::wstring out = in;
|
||||
return out.erase (0, in.find_first_not_of (t));
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
std::string trimRight (const std::string& in, const std::string& t /*= " "*/)
|
||||
{
|
||||
|
@ -113,13 +106,6 @@ std::string trimRight (const std::string& in, const std::string& t /*= " "*/)
|
|||
return out.erase (out.find_last_not_of (t) + 1);
|
||||
}
|
||||
|
||||
// UNICODE safe
|
||||
std::wstring trimRight (const std::wstring& in, const std::wstring& t /*= L" "*/)
|
||||
{
|
||||
std::wstring out = in;
|
||||
return out.erase (out.find_last_not_of (t) + 1);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
std::string trim (const std::string& in, const std::string& t /*= " "*/)
|
||||
{
|
||||
|
@ -127,13 +113,6 @@ std::string trim (const std::string& in, const std::string& t /*= " "*/)
|
|||
return trimLeft (trimRight (out, t), t);
|
||||
}
|
||||
|
||||
// UNICODE safe
|
||||
std::wstring trim (const std::wstring& in, const std::wstring& t /*= L" "*/)
|
||||
{
|
||||
std::wstring out = in;
|
||||
return trimLeft (trimRight (out, t), t);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Remove enclosing balanced quotes. Assumes trimmed text.
|
||||
void unquoteText (std::string& text)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue