Sha256: eaea78113c1ce2fac4cb8019751af85ceab470c4576ba048adb37059cd769826
Contents?: true
Size: 277 Bytes
Versions: 2
Compression:
Stored size: 277 Bytes
Contents
use libc::c_char; use std::ffi::{CStr}; use std::str; #[no_mangle] pub extern fn is_blank(string: *const c_char) -> bool { let c_str = unsafe { assert!(!string.is_null()); CStr::from_ptr(string) }; str::from_utf8(c_str.to_bytes()).unwrap().trim().is_empty() }
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
faster_path-0.1.7 | src/is_blank.rs |
faster_path-0.1.6 | src/is_blank.rs |