[][src]Function rustils::parse::short::str_to_i16

pub fn str_to_i16(a: &str) -> i16

Parse &str to i16

Panics

rustils::parse::short::str_to_i16("-32769");
rustils::parse::short::str_to_i16("32768");

Arguments

Examples

use rustils::parse::short::str_to_i16;

assert_eq!(str_to_i16("-32768"), -32768_i16);
assert_eq!(str_to_i16("32767"), 32767_i16);