| 63 | |
| 64 | template<int I, typename CharT> |
| 65 | constexpr auto get(const std::span<const CharT>& str) |
| 66 | { |
| 67 | auto start = std::begin(str); |
| 68 | const auto end = std::end(str); |
| 69 | |
| 70 | for(int i = 0; i <= I; ++i) { // #A Do it I-times |
| 71 | // #B Find the next percent sign |
| 72 | start = std::ranges::find(start, end, '%'); |
| 73 | ++start; // #C Without this we see the same percent sign |
| 74 | } |
| 75 | |
| 76 | return *start; // #D Return the format specifier character |
| 77 | } |
| 78 | |
| 79 | template<typename CharT, typename... Ts> |
| 80 | constexpr bool IsMatching(std::span<const CharT> str) |