Sha256: 73feeaed7d9711aea819e0f16a404acab84cb2a9f31cbcc7ed47f696dc6ac2af
Contents?: true
Size: 417 Bytes
Versions: 1
Compression:
Stored size: 417 Bytes
Contents
use std::path::MAIN_SEPARATOR; use libc::c_char; use std::ffi::{CStr}; use std::str; #[no_mangle] pub extern fn is_relative(string: *const c_char) -> bool { let c_str = unsafe { if string.is_null() { return false; } CStr::from_ptr(string) }; let r_str = str::from_utf8(c_str.to_bytes()).unwrap_or(""); r_str.chars().next().unwrap_or("muffins".chars().next().unwrap()) != MAIN_SEPARATOR }
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
faster_path-0.1.8 | src/is_relative.rs |