25 static constexpr Base base = Base::Binary;
33 static constexpr Base base = Base::Octal;
41 static constexpr Base base = Base::Hexadecimal;
75 requires std::is_signed_v<T>
81 bool is_negative =
false;
94 T remaining = value % std::to_underlying(base);
96 value = value / std::to_underlying(base);
109 requires std::is_unsigned_v<T>
121 T remaining = value % std::to_underlying(base);
123 value = value / std::to_underlying(base);
A dynamic string.
Definition String.hpp:11
String reverse(this String &self)
Reverse the string.
Definition String.cpp:69
void appendChar(this String &self, char ch)
Appends a character to the string.
Definition String.cpp:62
Contains functions to convert types into other types.
Definition Conversion.hpp:10
OctalValue< T > oct(T value)
Convert a value to an OctalValue.
Definition Conversion.hpp:53
HexadecimalValue< T > hex(T value)
Convert a value to a HexadecimalValue.
Definition Conversion.hpp:60
String::String intToString(T value, Base base)
Convert an integer to a String::String.
Definition Conversion.hpp:76
const char * baseToString(Base base)
Convert a base to a raw string.
Definition Conversion.cpp:15
Base
All conversion functions that take integers should support these bases.
Definition Conversion.hpp:13
String::String uintToString(T value, Base base)
Convert an unsigned integer to a String::String.
Definition Conversion.hpp:110
BinaryValue< T > bin(T value)
Convert a value to a BinaryValue.
Definition Conversion.hpp:46
Used to treat values as binary values.
Definition Conversion.hpp:23
Used to treat values as hexadecimal values.
Definition Conversion.hpp:39
Used to treat values as octal values.
Definition Conversion.hpp:31