Sha256: 20c221d7bc0991f5bd6b620a9eb6c4116f27b2af9e3f820402e4bafedb502f8b

Contents?: true

Size: 222 Bytes

Versions: 8

Compression:

Stored size: 222 Bytes

Contents

#[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

8 entries across 8 versions & 1 rubygems

Version Path
faster_path-0.1.5 src/is_blank.rs
faster_path-0.1.4 src/is_blank.rs
faster_path-0.1.3 src/is_blank.rs
faster_path-0.1.2 src/is_blank.rs
faster_path-0.1.1 src/is_blank.rs
faster_path-0.1.0 src/is_blank.rs
faster_path-0.0.9 src/is_blank.rs
faster_path-0.0.8 src/is_blank.rs