| 62 | namespace agi { namespace util { |
| 63 | |
| 64 | std::string strftime(const char *fmt, const tm *tmptr) { |
| 65 | if (!tmptr) { |
| 66 | time_t t = time(nullptr); |
| 67 | tmptr = localtime(&t); |
| 68 | } |
| 69 | |
| 70 | char buff[65536]; |
| 71 | ::strftime(buff, sizeof buff, fmt, tmptr); |
| 72 | return buff; |
| 73 | } |
| 74 | |
| 75 | std::string fold_case(std::string_view str, icu::Edits *edits) { |
| 76 | if (str.size() > std::numeric_limits<int32_t>::max()) |
no outgoing calls
no test coverage detected