diff options
Diffstat (limited to 'src/microhttpd/mhd_str.h')
-rw-r--r-- | src/microhttpd/mhd_str.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/microhttpd/mhd_str.h b/src/microhttpd/mhd_str.h index 9cc4bb19..b21ae256 100644 --- a/src/microhttpd/mhd_str.h +++ b/src/microhttpd/mhd_str.h | |||
@@ -424,4 +424,26 @@ MHD_uint64_to_str (uint64_t val, | |||
424 | size_t buf_size); | 424 | size_t buf_size); |
425 | 425 | ||
426 | 426 | ||
427 | /** | ||
428 | * Convert uint16_t value to decimal US-ASCII string padded with | ||
429 | * zeros on the left side. | ||
430 | * | ||
431 | * @note: result is NOT zero-terminated. | ||
432 | * @param val the value to convert | ||
433 | * @param min_digits the minimal number of digits to print, | ||
434 | * output padded with zeros on the left side, | ||
435 | * 'zero' value is interpreted as 'one', | ||
436 | * valid values are 3, 2, 1, 0 | ||
437 | * @param buf the buffer to result to | ||
438 | * @param buf_size size of the @a buffer | ||
439 | * @return number of charters has been put to the @a buf, | ||
440 | * zero if buffer is too small (buffer may be modified). | ||
441 | */ | ||
442 | size_t | ||
443 | MHD_uint8_to_str_pad (uint8_t val, | ||
444 | uint8_t min_digits, | ||
445 | char *buf, | ||
446 | size_t buf_size); | ||
447 | |||
448 | |||
427 | #endif /* MHD_STR_H */ | 449 | #endif /* MHD_STR_H */ |