| 142 | }; |
| 143 | |
| 144 | [[gnu::pure]] |
| 145 | static unsigned |
| 146 | ParseSubtuneName(const char *base) noexcept |
| 147 | { |
| 148 | base = StringAfterPrefix(base, SUBTUNE_PREFIX); |
| 149 | if (base == nullptr) |
| 150 | return 0; |
| 151 | |
| 152 | char *endptr; |
| 153 | auto track = strtoul(base, &endptr, 10); |
| 154 | if (endptr == base || *endptr != '.') |
| 155 | return 0; |
| 156 | |
| 157 | return track; |
| 158 | } |
| 159 | |
| 160 | /** |
| 161 | * returns the file path stripped of any /tune_xxx.* subtune suffix |
no outgoing calls
no test coverage detected