MCPcopy Create free account
hub / github.com/Marus/cortex-debug / parseHexOrDecInt

Function parseHexOrDecInt

src/common.ts:523–525  ·  view source on GitHub ↗
(str: string)

Source from the content-addressed store, hash-verified

521}
522
523export function parseHexOrDecInt(str: string): number {
524 return str.startsWith('0x') ? parseInt(str.substring(2), 16) : parseInt(str, 10);
525}
526
527export function toStringDecHexOctBin(val: number/* should be an integer*/): string {
528 if (Number.isNaN(val)) {

Callers 2

rttCommandsMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected