93 {
95 bool is_numeric = false;
96
98 case 'd':
99 case 'i': {
100 is_numeric = true;
102 stream_integral(temp, a);
104
105
107 if (!is_negative) {
112 }
113 }
114 break;
115 }
116
117 case 'u': {
118 is_numeric = true;
119 sstream temp;
122 break;
123 }
124
125 case 'o': {
126 is_numeric = true;
128
131 }
132 break;
133 }
134
135 case 'x': {
136 is_numeric = true;
137
138 const bool negative = a.
s < 0;
139 const fl::u64 magnitude =
140 negative ?
static_cast<fl::u64
>(0) - a.
u : a.u;
142 magnitude,
147 }
148 break;
149 }
150
151 case 'f':
153 break;
154
155 case 'c': {
156 char temp_str[2] = {
static_cast<char>(a.
u),
'\0'};
158 break;
159 }
160
161 case 's': {
162 sstream temp;
165 break;
166 }
167
168 default:
169 result =
"<unknown_format>";
170 break;
171 }
173}
string str() const FL_NO_EXCEPT
fl::string hex(u64 value, HexIntWidth width, bool is_negative, bool uppercase, bool pad_to_width)
Internal hex conversion function (implementation in charconv.cpp)
HexIntWidth
Integer width classification for hex conversion.
void stream_integral(sstream &temp, const ScalarArg &a) FL_NO_EXCEPT
void emit_padded(sstream &stream, const FormatSpec &spec, const fl::string &result, bool is_numeric) FL_NO_EXCEPT
fl::string to_octal(T value) FL_NO_EXCEPT
expected< T, E > result
Alias for expected (Rust-style naming)