| 54 | inline int snprintf(char* buffer, size_t size, const char* format, ...) |
| 55 | PRINTF_FORMAT(3, 4); |
| 56 | inline int snprintf(char* buffer, size_t size, const char* format, ...) { |
| 57 | va_list arguments; |
| 58 | va_start(arguments, format); |
| 59 | int result = vsnprintf(buffer, size, format, arguments); |
| 60 | va_end(arguments); |
| 61 | return result; |
| 62 | } |
| 63 | |
| 64 | // BSD-style safe and consistent string copy functions. |
| 65 | // Copies |src| to |dst|, where |dst_size| is the total allocated size of |dst|. |