|
Packit |
4e8bc4 |
#ifndef ITOA_LJUST_H
|
|
Packit |
4e8bc4 |
#define ITOA_LJUST_H
|
|
Packit |
4e8bc4 |
|
|
Packit |
4e8bc4 |
//=== itoa_ljust.h - Fast integer to ascii conversion
|
|
Packit |
4e8bc4 |
//
|
|
Packit |
4e8bc4 |
// Fast and simple integer to ASCII conversion:
|
|
Packit |
4e8bc4 |
//
|
|
Packit |
4e8bc4 |
// - 32 and 64-bit integers
|
|
Packit |
4e8bc4 |
// - signed and unsigned
|
|
Packit |
4e8bc4 |
// - user supplied buffer must be large enough for all decimal digits
|
|
Packit |
4e8bc4 |
// in value plus minus sign if negative
|
|
Packit |
4e8bc4 |
// - left-justified
|
|
Packit |
4e8bc4 |
// - NUL terminated
|
|
Packit |
4e8bc4 |
// - return value is pointer to NUL terminator
|
|
Packit |
4e8bc4 |
//
|
|
Packit |
4e8bc4 |
// Copyright (c) 2016 Arturo Martin-de-Nicolas
|
|
Packit |
4e8bc4 |
// arturomdn@gmail.com
|
|
Packit |
4e8bc4 |
// https://github.com/amdn/itoa_ljust/
|
|
Packit |
4e8bc4 |
//===----------------------------------------------------------------------===//
|
|
Packit |
4e8bc4 |
|
|
Packit |
4e8bc4 |
#include <stdint.h>
|
|
Packit |
4e8bc4 |
|
|
Packit |
4e8bc4 |
char* itoa_u32(uint32_t u, char* buffer);
|
|
Packit |
4e8bc4 |
char* itoa_32( int32_t i, char* buffer);
|
|
Packit |
4e8bc4 |
char* itoa_u64(uint64_t u, char* buffer);
|
|
Packit |
4e8bc4 |
char* itoa_64( int64_t i, char* buffer);
|
|
Packit |
4e8bc4 |
|
|
Packit |
4e8bc4 |
#endif // ITOA_LJUST_H
|