FreeBSD の libutil にある humanize_number とexpand_number で K/M/G ― 2019年03月20日 20時37分35秒
humanize_number は数字を表示形式に変換。expand_number は表示形式から数字に変換。
詳しくは、man を参照のこと。humanize_number - format a number into a human readable form int humanize_number(char *buf, size_t len, int64_t number, const char *suffix, int scale, int flags); expand_number - format a number from human readable form int expand_number(const char *buf, uint64_t *num);
最近のコメント