MCPcopy Create free account
hub / github.com/dop251/goja / strToInt

Function strToInt

runtime.go:3144–3151  ·  view source on GitHub ↗
(s unistring.String)

Source from the content-addressed store, hash-verified

3142}
3143
3144func strToInt(s unistring.String) (int, bool) {
3145 if bits.UintSize == 32 {
3146 n, ok := strToInt32(s)
3147 return int(n), ok
3148 }
3149 n, ok := strToInt64(s)
3150 return int(n), ok
3151}
3152
3153// Attempts to convert a string into a canonical integer.
3154// On success returns (number, true).

Callers 13

definePropertyStrMethod · 0.85
hasStrMethod · 0.85
getStrMethod · 0.85
setStrMethod · 0.85
deleteStrMethod · 0.85
getStrMethod · 0.85
getOwnPropStrMethod · 0.85
setOwnStrMethod · 0.85
hasOwnPropertyStrMethod · 0.85
defineOwnPropertyStrMethod · 0.85
deleteStrMethod · 0.85

Calls 2

strToInt32Function · 0.85
strToInt64Function · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…