MCPcopy Create free account
hub / github.com/MusicPlayerDaemon/MPD / ParseSubtuneName

Function ParseSubtuneName

src/decoder/plugins/SidplayDecoderPlugin.cxx:144–158  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

142};
143
144[[gnu::pure]]
145static unsigned
146ParseSubtuneName(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

Callers 1

ParseContainerPathFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected