15#if ADA_DEVELOPMENT_CHECKS
32template <
typename out_iter>
33void encode_json(std::string_view view, out_iter out);
49 std::string_view& input)
noexcept;
102bool overlaps(std::string_view input1,
const std::string& input2)
noexcept;
111 size_t pos2)
noexcept {
112#if ADA_DEVELOPMENT_CHECKS
114 std::cerr <<
"Negative-length substring: [" << pos1 <<
" to " << pos2 <<
")"
119 return input.substr(pos1, pos2 - pos1);
135 bool is_special, std::string_view& view)
noexcept;
149template <
class url_type>
151 url_type& url)
noexcept;
158find_authority_delimiter_special(std::string_view view)
noexcept;
165find_authority_delimiter(std::string_view view)
noexcept;
170template <
typename T,
typename... Args>
171inline void inner_concat(std::string& buffer, T t) {
178template <
typename T,
typename... Args>
179inline void inner_concat(std::string& buffer, T t, Args... args) {
181 return inner_concat(buffer, args...);
189template <
typename... Args>
190std::string concat(Args... args) {
192 inner_concat(answer, args...);
200inline int leading_zeroes(uint32_t input_num)
noexcept {
201#if ADA_REGULAR_VISUAL_STUDIO
202 unsigned long leading_zero(0);
203 unsigned long in(input_num);
204 return _BitScanReverse(&leading_zero, in) ? int(31 - leading_zero) : 32;
206 return __builtin_clz(input_num);
216inline int fast_digit_count(uint32_t x)
noexcept {
217 auto int_log2 = [](uint32_t z) ->
int {
218 return 31 - ada::helpers::leading_zeroes(z | 1);
224 const static uint64_t
table[] = {
225 4294967296, 8589934582, 8589934582, 8589934582, 12884901788,
226 12884901788, 12884901788, 17179868184, 17179868184, 17179868184,
227 21474826480, 21474826480, 21474826480, 21474826480, 25769703776,
228 25769703776, 25769703776, 30063771072, 30063771072, 30063771072,
229 34349738368, 34349738368, 34349738368, 34349738368, 38554705664,
230 38554705664, 38554705664, 41949672960, 41949672960, 41949672960,
231 42949672960, 42949672960};
232 return int((x + table[int_log2(x)]) >> 32);
Common definitions for cross-platform compiler support.
#define ada_really_inline
Includes the definitions for helper functions.
const uint32_t table[8000][2]
Definitions for the states of the URL state machine.
Declaration for the basic URL definitions.