Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/third_party/rust/cstr/tests/pass/   (Browser von der Mozilla Stiftung Version 136.0.1©)  Datei vom 10.2.2025 mit Größe 283 B image not shown  

Quelle  ident.rs   Sprache: unbekannt

 
use cstr::cstr;
use std::ffi::CStr;

fn main() {
    let foo: &'static CStr = cstr!(foobar);
    assert_eq!(foo, CStr::from_bytes_with_nul(b"foobar\0").unwrap());
    let foo: &'static CStr = cstr!(r#foobar);
    assert_eq!(foo, CStr::from_bytes_with_nul(b"r#foobar\0").unwrap());
}

[ Dauer der Verarbeitung: 0.2 Sekunden  (vorverarbeitet)  ]