Skip to content

Commit

Permalink
feat(Core/HyperLinks): implement HyperLinks check (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
Winfidonarleyan authored Sep 11, 2020
1 parent b0c57d8 commit b9d67e7
Show file tree
Hide file tree
Showing 19 changed files with 2,508 additions and 2,702 deletions.
34 changes: 0 additions & 34 deletions src/common/Utilities/Util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,40 +159,6 @@ time_t GetLocalHourTimestamp(time_t time, uint8 hour, bool onlyAfterTime)
return hourLocal;
}

void stripLineInvisibleChars(std::string& str)
{
static std::string const invChars = " \t\7\n";

size_t wpos = 0;

bool space = false;
for (size_t pos = 0; pos < str.size(); ++pos)
{
if (invChars.find(str[pos]) != std::string::npos)
{
if (!space)
{
str[wpos++] = ' ';
space = true;
}
}
else
{
if (wpos != pos)
str[wpos++] = str[pos];
else
++wpos;
space = false;
}
}

if (wpos < str.size())
str.erase(wpos, str.size());
if (str.find("|TInterface") != std::string::npos)
str.clear();

}

std::string secsToTimeString(uint64 timeInSecs, bool shortText)
{
uint64 secs = timeInSecs % MINUTE;
Expand Down
1 change: 0 additions & 1 deletion src/common/Utilities/Util.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ WH_COMMON_API time_t LocalTimeToUTCTime(time_t time);
WH_COMMON_API time_t GetLocalHourTimestamp(time_t time, uint8 hour, bool onlyAfterTime = true);
WH_COMMON_API tm TimeBreakdown(time_t t);

WH_COMMON_API void stripLineInvisibleChars(std::string& src);
WH_COMMON_API int32 MoneyStringToMoney(const std::string& moneyString);
WH_COMMON_API std::string secsToTimeString(uint64 timeInSecs, bool shortText = false);
WH_COMMON_API uint32 TimeStringToSecs(const std::string& timestring);
Expand Down
Loading

0 comments on commit b9d67e7

Please sign in to comment.