MCPcopy Create free account
hub / github.com/microsoft/typescript-go / isNumberRune

Function isNumberRune

internal/jsnum/string.go:322–341  ·  view source on GitHub ↗
(r rune)

Source from the content-addressed store, hash-verified

320}
321
322func isNumberRune(r rune) bool {
323 if stringutil.IsDigit(r) {
324 return true
325 }
326
327 if 'a' <= r && r <= 'f' {
328 return true
329 }
330
331 if 'A' <= r && r <= 'F' {
332 return true
333 }
334
335 switch r {
336 case '.', '-', '+', 'x', 'X', 'o', 'O':
337 return true
338 }
339
340 return false
341}

Callers 1

FromStringFunction · 0.85

Calls 1

IsDigitFunction · 0.92

Tested by

no test coverage detected