"Fossies" - the Fresh Open Source Software Archive

Member "memcached-1.6.15/itoa_ljust.h" (16 Jul 2020, 822 Bytes) of package /linux/www/memcached-1.6.15.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "itoa_ljust.h" see the Fossies "Dox" file reference documentation.

    1 #ifndef ITOA_LJUST_H
    2 #define ITOA_LJUST_H
    3 
    4 //=== itoa_ljust.h - Fast integer to ascii conversion
    5 //
    6 // Fast and simple integer to ASCII conversion:
    7 //
    8 //   - 32 and 64-bit integers
    9 //   - signed and unsigned
   10 //   - user supplied buffer must be large enough for all decimal digits
   11 //     in value plus minus sign if negative
   12 //   - left-justified
   13 //   - NUL terminated
   14 //   - return value is pointer to NUL terminator
   15 //
   16 // Copyright (c) 2016 Arturo Martin-de-Nicolas
   17 // arturomdn@gmail.com
   18 // https://github.com/amdn/itoa_ljust/
   19 //===----------------------------------------------------------------------===//
   20 
   21 #include <stdint.h>
   22 
   23 char* itoa_u32(uint32_t u, char* buffer);
   24 char* itoa_32( int32_t i, char* buffer);
   25 char* itoa_u64(uint64_t u, char* buffer);
   26 char* itoa_64( int64_t i, char* buffer);
   27 
   28 #endif // ITOA_LJUST_H