util: Removed unused strippedLength() function
This commit is contained in:
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&);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user