Skip to main content

array_index

Function array_index 

Source
pub fn array_index(k: &str) -> Option<u32>
Expand description

If k is an array-index property key, return its numeric value. Per ECMAScript, a String property key P is an array index iff ToString(ToUint32(P)) === P and ToUint32(P) !== 2^32 - 1 — i.e. a canonical decimal (no leading zeros, no sign) in the range 0..=2^32-2.