MCPcopy Create free account
hub / github.com/callstack/agent-device / matchLabeledNumber

Function matchLabeledNumber

src/platforms/android/perf.ts:386–392  ·  view source on GitHub ↗
(text: string, label: string)

Source from the content-addressed store, hash-verified

384}
385
386function matchLabeledNumber(text: string, label: string): number | undefined {
387 const escapedLabel = label.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
388 const match = text.match(new RegExp(`${escapedLabel}:\\s*([0-9][0-9,]*)`, 'i'));
389 if (!match) return undefined;
390 const token = match[1];
391 return token === undefined ? undefined : (parseNumericToken(token) ?? undefined);
392}
393
394function matchTotalRowPss(text: string): number | undefined {
395 for (const rawLine of text.split('\n')) {

Callers 1

Calls 1

parseNumericTokenFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…