Skip to main content

sqlite_int32

Function sqlite_int32 

Source
pub fn sqlite_int32(text: &str) -> Option<i32>
Expand description

Reads a 32 bit integer the way SQLite’s sqlite3GetInt32 does.

An optional sign and decimal digits, or 0x and up to eight hex digits. Anything after the digits is ignored, so 1.5 reads as 1. Text that is not a number, or a number that does not fit in 32 bits, is None. SQLite reads 4294967295 as nothing rather than as -1, which is why PRAGMA user_version = 4294967295 reads back 0.

@param text - the argument’s text