mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
util: Migrated obfuscateText calls to libshared
This commit is contained in:
parent
aad7fa60f8
commit
dc851fe4b2
2 changed files with 0 additions and 33 deletions
32
src/util.cpp
32
src/util.cpp
|
@ -286,38 +286,6 @@ std::string osName ()
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
const std::string obfuscateText (const std::string& input)
|
|
||||||
{
|
|
||||||
std::stringstream output;
|
|
||||||
std::string::size_type i = 0;
|
|
||||||
int character;
|
|
||||||
bool inside = false;
|
|
||||||
|
|
||||||
while ((character = utf8_next_char (input, i)))
|
|
||||||
{
|
|
||||||
if (inside)
|
|
||||||
{
|
|
||||||
output << (char) character;
|
|
||||||
|
|
||||||
if (character == 'm')
|
|
||||||
inside = false;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (character == 033)
|
|
||||||
inside = true;
|
|
||||||
|
|
||||||
if (inside || character == ' ')
|
|
||||||
output << (char) character;
|
|
||||||
else
|
|
||||||
output << 'x';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return output.str ();
|
|
||||||
}
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
bool nontrivial (const std::string& input)
|
bool nontrivial (const std::string& input)
|
||||||
{
|
{
|
||||||
|
|
|
@ -61,7 +61,6 @@ const std::vector <std::string> extractParents (
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
std::string osName ();
|
std::string osName ();
|
||||||
const std::string obfuscateText (const std::string&);
|
|
||||||
bool nontrivial (const std::string&);
|
bool nontrivial (const std::string&);
|
||||||
int strippedLength (const std::string&);
|
int strippedLength (const std::string&);
|
||||||
const char* optionalBlankLine ();
|
const char* optionalBlankLine ();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue