48 static constexpr int impl(
const std::string_view ll,
const std::string_view rr)
noexcept
57 const char* l = ll.data();
58 const char* ll_end = ll.data() + ll.size();
59 const char* r = rr.data();
60 const char* rr_end = rr.data() + rr.size();
61 while(l != ll_end && r != rr_end && *l && *r)
65 char l_char{}, r_char{};
66 while((l != ll_end && r != rr_end) && (l_char = *l) && (r_char = *r))
69 const bool l_digit = alphanum_isdigit(l_char),
70 r_digit = alphanum_isdigit(r_char);
72 if(l_digit && r_digit)
84 const int diff = l_char - r_char;
96 unsigned long l_int = 0;
97 while(l != ll_end && *l && alphanum_isdigit(*l))
100 l_int = l_int * 10 + *l -
'0';
105 unsigned long r_int = 0;
106 while(r != rr_end && *r && alphanum_isdigit(*r))
109 r_int = r_int * 10 + *r -
'0';
114 const long diff = l_int - r_int;