7CLASS_DECL_ACME
bool ishexdigit(::i8 ch);
14 CLASS_DECL_ACME
string to_asc(const ::scoped_string & scopedstrHex);
15 CLASS_DECL_ACME
string from_asc(const ::scoped_string & scopedstrAsc);
18 CLASS_DECL_ACME ::i64 to_i64(const ::scoped_string & scopedstr);
20 CLASS_DECL_ACME ::u64 to_u64(const ::scoped_string & scopedstr);
22 CLASS_DECL_ACME ::u32 to_u32(const ::scoped_string & scopedstr);
24 inline CLASS_DECL_ACME ::i32 to_nibble(::i8 ch)
27 return (ch >=
'0' && ch <=
'9') ? ch -
'0' :
29 (ch >=
'a' && ch <=
'f') ? ch -
'a' + 10 :
31 (ch >=
'A' && ch <=
'F') ? ch -
'A' + 10 :
39 constexpr CLASS_DECL_ACME ::i8 nibble_lower_case_from(::u8 b)
54 constexpr CLASS_DECL_ACME ::i8 nibble_upper_case_from(::u8 b)
69 constexpr CLASS_DECL_ACME
void lower_case_from(char_pointer sz, ::u8 b)
72 sz[0] = nibble_lower_case_from((b >> 4) & (::i8) 0x0f);
73 sz[1] = nibble_lower_case_from(b & (::i8) 0x0f);
78 constexpr CLASS_DECL_ACME
void upper_case_from(char_pointer sz, ::u8 b)
81 sz[0] = nibble_upper_case_from((b >> 4) & (::i8) 0x0f);
82 sz[1] = nibble_upper_case_from(b & (::i8) 0x0f);
88 constexpr CLASS_DECL_ACME
void lower_case_from(char_pointer sz,
const void * p, memsize s)
90 const ::u8 * pb = (const ::u8 *) p;
93 lower_case_from(sz, *pb);
101 constexpr CLASS_DECL_ACME
void upper_case_from(char_pointer sz,
const void * p, memsize s)
103 const ::u8 * pb = (const ::u8 *) p;
106 upper_case_from(sz, *pb);
115 inline string lower_case_from(
const void * p, memsize s)
118 lower_case_from(str.get_buffer(s * 2), p, s);
119 str.release_buffer(s * 2);
124 inline string upper_case_from(
const void * p, memsize s)
127 upper_case_from(str.get_buffer(s * 2), p, s);
128 str.release_buffer(s * 2);
133 template < prototype_
integral INTEGRAL >
134 constexpr auto upper_case_from(INTEGRAL i)
137 ::inline_number_string numberstring;
139 __tosz(i, numberstring.m_end, 16, e_digit_case_upper);
146 template < prototype_
integral INTEGRAL >
147 constexpr auto lower_case_from(INTEGRAL i)
150 ::inline_number_string numberstring;
152 __tosz(i, numberstring.m_end, 16, e_digit_case_lower);
159 template <
character_count s_iW
idth >
160 inline auto padded_from(::u64 u, enum_digit_case edigitcase)
163 ::inline_string < ::i8, s_iWidth > numberstring;
168 __rear_tosz(u, numberstring.m_end, 16, edigitcase);
172 while (numberstring.size() < s_iWidth)
175 *((char_pointer &)numberstring.m_end)++ =
'0';
179 reverse(((char_pointer )numberstring.m_begin), ((char_pointer )(numberstring.m_end)));
181 *((char_pointer &)numberstring.m_end + 1) =
'\0';
188 template <
character_count s_iW
idth >
189 inline auto lower_case_padded_from(::u64 u)
192 return padded_from < s_iWidth >(u, e_digit_case_lower);
197 template <
character_count s_iW
idth >
198 inline auto upper_case_padded_from(::u64 u)
201 return padded_from < s_iWidth >(u, e_digit_case_upper);
206 inline void to(::u32 & u,const ::scoped_string & scopedstr) { u = to_u32(scopedstr); }
207 inline void to(::u64 & u,const ::scoped_string & scopedstr) { u = to_u64(scopedstr); }
209 inline void to(ulong & u,const ::scoped_string & scopedstr) { u = to_u64(scopedstr); }
211 inline uptr to_uptr(const ::scoped_string & scopedstr) { uptr u; to(u,scopedstr);
return u; }
213 ::u16 parse_u16_exc(::const_ansi_range & range);
221inline bool ishexdigit(::i8 ch)
223 return (ch >=
'0' && ch <=
'9')
224 || (ch >=
'a' && ch <=
'f')
225 || (ch >=
'A' && ch <=
'F');
235 CLASS_DECL_ACME
string lower_case_from(
const block & block);
237 CLASS_DECL_ACME
string upper_case_from(
const block & block);