MCPcopy Create free account
hub / github.com/GrapheneCt/NetStream / ParseRefString

Method ParseRefString

NetStream/source/browsers/hvdb_tracks_browser.cpp:215–241  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

213}
214
215void HvdbTracksBrowser::ParseRefString(const char *str, HVDBItem **item, uint32_t *idx)
216{
217 if (!str)
218 {
219 return;
220 }
221
222 const char *last = NULL;
223 const char *p = str;
224 for (; *p; ++p)
225 {
226 if (((*p >= '0' && *p <= '9') || *p == '_') && (p == str || *(p - 1) == '/'))
227 {
228 last = p;
229 }
230 }
231
232 if (last)
233 {
234 char *end = NULL;
235 *item = reinterpret_cast<HVDBItem *>(sce_paf_strtoul(last, &end, 10));
236 if (end)
237 {
238 *idx = sce_paf_strtoul(end + 1, NULL, 10);
239 }
240 }
241}
242
243HVDBItem *HvdbTracksBrowser::GetItemAt(HVDBItem *firstItem, uint32_t idx)
244{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected