mirror of https://github.com/kiwix/libkiwix.git
Merge pull request #971 from kiwix/beautifyPublic
Make beautifyFileSize public
This commit is contained in:
commit
de517330f6
|
@ -216,5 +216,14 @@ std::map<std::string, std::string> getNetworkInterfaces();
|
||||||
*/
|
*/
|
||||||
std::string getBestPublicIp();
|
std::string getBestPublicIp();
|
||||||
|
|
||||||
|
/** Converts file size to human readable format.
|
||||||
|
*
|
||||||
|
* This function will convert a number to its equivalent size using units.
|
||||||
|
*
|
||||||
|
* @param number file size in bytes.
|
||||||
|
* @return a human-readable string representation of the size, e.g., "2.3 KB", "1.8 MB", "5.2 GB".
|
||||||
|
*/
|
||||||
|
std::string beautifyFileSize(uint64_t number);
|
||||||
|
|
||||||
}
|
}
|
||||||
#endif // KIWIX_TOOLS_H
|
#endif // KIWIX_TOOLS_H
|
||||||
|
|
|
@ -31,7 +31,6 @@
|
||||||
namespace kiwix
|
namespace kiwix
|
||||||
{
|
{
|
||||||
std::string beautifyInteger(uint64_t number);
|
std::string beautifyInteger(uint64_t number);
|
||||||
std::string beautifyFileSize(uint64_t number);
|
|
||||||
void printStringInHexadecimal(const char* s);
|
void printStringInHexadecimal(const char* s);
|
||||||
void printStringInHexadecimal(icu::UnicodeString s);
|
void printStringInHexadecimal(icu::UnicodeString s);
|
||||||
void stringReplacement(std::string& str,
|
void stringReplacement(std::string& str,
|
||||||
|
|
Loading…
Reference in New Issue