A Windows strings library that supports AString (ANSI string) and WString (Unicode string).
Add the following lines to your Cargo.toml:
[dependencies]
windy = "0.1.3"
An example of parsing the outputs of cmd.exe.
```rust use windy::AString; use std::process::Command;
fn main() { let o = Command::new("cmd") .args(&["/c", "ThisCommandDoesNotExist"]) .output().unwrap(); let (stdout, stderr) = unsafe { ( AString::newunchecked(o.stdout), AString::newunchecked(o.stderr) ) }; println!("stdout: {:?}", stdout); println!("stderr: {:?}", stderr); } ```
If you want to use no_std, turn on the no_std
feature.
AString and WString are not available when no_std
feature is on.
windy-macros to convert a UTF-8 string to WString or AString at compile time.
If you want to use macros, turn on the macros
feature.
```rust use windy::WStr; use windy::macros::wstr;
fn main() { let s: &WStr = wstr!("test"); } ```
This software is released under the MIT or Apache-2.0 License, see LICENSE-MIT or LICENSE-APACHE.