ruby_scan_digits

Function ruby_scan_digits 

Source
pub unsafe extern "C" fn ruby_scan_digits(
    str_: *const c_char,
    len: ssize_t,
    base: c_int,
    retlen: *mut size_t,
    overflow: *mut c_int,
) -> c_ulong
Expand description

Scans the passed string, assuming the string is a textual representation of an integer. Stops when encountering something non-digit for the passed base.

§@note This does not understand minus sign. @note This does not understand e.g. 0x prefix. @note It is a failure to pass 0 to base, unlike ruby_strtoul(). @param[in] str Target string of digits to interpret. @param[in] len Number of bytes of str, or -1 to detect NUL. @param[in] base Base, 2 to 36 inclusive. @param[out] retlen Return value buffer. @param[out] overflow Return value buffer. @return Interpreted numeric representation of str. @post retlen is the number of bytes scanned so far. @post overflow is set to true if the string represents something bigger than ULONG_MAX. Something meaningful still returns; which is the designed belabour of C’s unsigned arithmetic.

Generated by rb-sys for Ruby mri-x86_64-linux-gnu-3.2.3