windows-strings (0.100.0+paring.1)
Published 2026-10-14 03:21:29 +09:00 by paring
Installation
[registries.forgejo]
index = "sparse+ " # Sparse index
# index = " " # Git
[net]
git-fetch-with-cli = truecargo add windows-strings@0.100.0+paring.1 --registry forgejoAbout this package
Windows string types
windows-strings
The windows-strings crate provides Windows string types and literals.
Start by adding the following to your Cargo.toml file:
[dependencies.windows-strings]
version = "0.100"
Use the Windows string types as needed:
use windows_strings::*;
const A: PCSTR = s!("ansi");
const W: PCWSTR = w!("wide");
fn main() {
let b = BSTR::from("bstr");
let h = HSTRING::from("hstring");
assert_eq!(b, "bstr");
assert_eq!(h, "hstring");
assert_eq!(unsafe { A.to_string().unwrap() }, "ansi");
assert_eq!(unsafe { W.to_string().unwrap() }, "wide");
}
Dependencies
| ID | Version |
|---|---|
| windows-link | ^0.100.0 |
Details
2026-10-14 03:21:29 +09:00
2026-11-15 19:56:40 +09:00
Assets (1)
Versions (1)
View all
Cargo
21
MIT OR Apache-2.0
14 KiB
0.100.0+paring.1
2026-10-14