--- nono/lib/mystring.h 2026/04/29 17:05:15 1.1.1.7 +++ nono/lib/mystring.h 2026/04/29 17:05:57 1.1.1.9 @@ -48,12 +48,12 @@ extern std::vector string_s int nlimit = 0); // 文字列 str を文字 c で分割したリストを返す。 -static inline std::vector string_split(const char *str, char c, +inline std::vector string_split(const char *str, char c, int nlimit = 0) { return string_split(str, strlen(str), c, nlimit); } // 文字列 str を文字 c で分割したリストを返す。 -static inline std::vector string_split(const std::string& str, +inline std::vector string_split(const std::string& str, char c, int nlimit = 0) { return string_split(str.c_str(), str.size(), c, nlimit); } @@ -63,3 +63,8 @@ extern std::string format_number(uint64 // val を width 桁ゼロ埋めした 16進数文字列にして返す。 extern std::string strhex(uint32 val, int width = 8); + +// 経過時刻 t を文字列にして返す。(フル版) +extern const std::string TimeToStr(uint64 t); +// 経過時刻 t を文字列にして返す。(10秒未満のみの短縮版) +extern const std::string SecToStr(uint64 t);