HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
format.hpp
1// Copyright 2019 Pokitec
2// All rights reserved.
3
4#pragma once
5
6namespace tt {
7
8constexpr inline bool format_uses_arg_ids(const char *fmt)
9{
10 bool start_placeholder = false;
11
12 while (true) {
13 ttlet c = *(fmt++);
14 if (c == 0) {
15 return false;
16 } else if (c == '{') {
17 start_placeholder = true;
18 } else if (start_placeholder && c >= '0' && c <= '9') {
19 return true;
20 } else {
21 start_placeholder = false;
22 }
23 }
24}
25
26
27}