util: Migrated obfuscateText calls to libshared
This commit is contained in:
32
src/util.cpp
32
src/util.cpp
@@ -286,38 +286,6 @@ std::string osName ()
|
||||
#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)
|
||||
{
|
||||
|
||||
@@ -61,7 +61,6 @@ const std::vector <std::string> extractParents (
|
||||
#endif
|
||||
|
||||
std::string osName ();
|
||||
const std::string obfuscateText (const std::string&);
|
||||
bool nontrivial (const std::string&);
|
||||
int strippedLength (const std::string&);
|
||||
const char* optionalBlankLine ();
|
||||
|
||||
Reference in New Issue
Block a user