mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-09-09 00:30:36 +02:00
util: Removed unused strippedLength() function
This commit is contained in:
parent
a9e65e7e61
commit
47715322dc
2 changed files with 0 additions and 28 deletions
27
src/util.cpp
27
src/util.cpp
|
@ -269,33 +269,6 @@ bool nontrivial (const std::string& input)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Return the length, in characters, of the input, subtracting color control
|
|
||||||
// codes.
|
|
||||||
int strippedLength (const std::string& input)
|
|
||||||
{
|
|
||||||
int length = input.length ();
|
|
||||||
bool inside = false;
|
|
||||||
int count = 0;
|
|
||||||
for (int i = 0; i < length; ++i)
|
|
||||||
{
|
|
||||||
if (inside)
|
|
||||||
{
|
|
||||||
if (input[i] == 'm')
|
|
||||||
inside = false;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (input[i] == 033)
|
|
||||||
inside = true;
|
|
||||||
else
|
|
||||||
++count;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return count;
|
|
||||||
}
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
const char* optionalBlankLine ()
|
const char* optionalBlankLine ()
|
||||||
{
|
{
|
||||||
|
|
|
@ -61,7 +61,6 @@ const std::vector <std::string> extractParents (
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool nontrivial (const std::string&);
|
bool nontrivial (const std::string&);
|
||||||
int strippedLength (const std::string&);
|
|
||||||
const char* optionalBlankLine ();
|
const char* optionalBlankLine ();
|
||||||
void setHeaderUnderline (Table&);
|
void setHeaderUnderline (Table&);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue