Intermiediary commit.

This commit is contained in:
Shyotl
2019-03-16 17:51:00 -05:00
parent 7cf55fa993
commit 2d8fbb89c9
58 changed files with 1857 additions and 1057 deletions

View File

@@ -815,6 +815,26 @@ std::string LLStringOps::getDatetimeCode (std::string key)
}
std::string LLStringOps::getReadableNumber(F64 num)
{
if (fabs(num)>=1e9)
{
return llformat("%.2lfB", num / 1e9);
}
else if (fabs(num)>=1e6)
{
return llformat("%.2lfM", num / 1e6);
}
else if (fabs(num)>=1e3)
{
return llformat("%.2lfK", num / 1e3);
}
else
{
return llformat("%.2lf", num);
}
}
namespace LLStringFn
{
// NOTE - this restricts output to ascii