FastLED 3.9.15
Loading...
Searching...
No Matches
charconv.h File Reference
#include "fl/stl/stdint.h"
#include "fl/stl/cstddef.h"
#include "fl/stl/noexcept.h"
#include "fl/stl/static_assert.h"
+ Include dependency graph for charconv.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  fl
 Base definition for an LED controller.
 
namespace  fl::detail
 Compile-time linker keep-alive hook for a single fl::Bus.
 

Enumerations

enum class  fl::detail::HexIntWidth : u8 { fl::detail::Width8 = 8 , fl::detail::Width16 = 16 , fl::detail::Width32 = 32 , fl::detail::Width64 = 64 }
 Integer width classification for hex conversion. More...
 

Functions

void fl::ftoa (float value, char *buffer, int precision=2) FL_NOEXCEPT
 Convert floating point number to string buffer.
 
template<size_t Size>
constexpr HexIntWidth fl::detail::get_hex_int_width () FL_NOEXCEPT
 Compile-time integer width determination (default - triggers error)
 
template<>
constexpr HexIntWidth fl::detail::get_hex_int_width< 1 > () FL_NOEXCEPT
 Specialization for 1-byte types (int8_t, uint8_t, char, etc.)
 
template<>
constexpr HexIntWidth fl::detail::get_hex_int_width< 2 > () FL_NOEXCEPT
 Specialization for 2-byte types (int16_t, uint16_t, short, etc.)
 
template<>
constexpr HexIntWidth fl::detail::get_hex_int_width< 4 > () FL_NOEXCEPT
 Specialization for 4-byte types (int32_t, uint32_t, int, etc.)
 
template<>
constexpr HexIntWidth fl::detail::get_hex_int_width< 8 > () FL_NOEXCEPT
 Specialization for 8-byte types (i64, u64, long long, etc.)
 
fl::string fl::detail::hex (u64 value, HexIntWidth width, bool is_negative, bool uppercase, bool pad_to_width) FL_NOEXCEPT
 Internal hex conversion function (implementation in charconv.cpp)
 
int fl::itoa (i32 value, char *buffer, int radix) FL_NOEXCEPT
 Convert signed 32-bit integer to string buffer in given radix.
 
int fl::itoa64 (i64 value, char *buffer, int radix) FL_NOEXCEPT
 Convert signed 64-bit integer to string buffer in given radix.
 
float fl::parseFloat (const char *str, fl::size len) FL_NOEXCEPT
 Parse a floating point number from a character buffer.
 
int fl::parseInt (const char *str) FL_NOEXCEPT
 Parse an integer from a null-terminated string.
 
int fl::parseInt (const char *str, fl::size len) FL_NOEXCEPT
 Parse an integer from a character buffer.
 
template<typename T>
fl::string fl::to_hex (T value, bool uppercase=false, bool pad_to_width=false) FL_NOEXCEPT
 Convert an integer value to hexadecimal string representation.
 
int fl::utoa32 (u32 value, char *buffer, int radix) FL_NOEXCEPT
 Convert unsigned 32-bit integer to string buffer in given radix.
 
int fl::utoa64 (u64 value, char *buffer, int radix) FL_NOEXCEPT
 Convert unsigned 64-bit integer to string buffer in given radix.