[][src]Crate windy

Windy

Windows strings library

This crate supports AString (ANSI string) and WString (Unicode string).

Features

  • ANSI string(AString)
  • Unicode string(WString)
  • Interconversion between AString, WString and String.

Example

An example of parsing the outputs of cmd.exe.

use windy::AString;
use std::process::Command;

fn main() {
    let o = Command::new("cmd")
        .args(&["/c", "ThisCommandDoesNotExist"])
        .output().unwrap();
    let (stdout, stderr) = unsafe {
        (
            AString::new_unchecked(o.stdout),
            AString::new_unchecked(o.stderr)
        )
    };
    println!("stdout: {:?}", stdout);
    println!("stderr: {:?}", stderr);
}

License

This software is released under the MIT or Apache-2.0 License, see LICENSE-MIT or LICENSE-APACHE.

Macros

conv_err

Structs

AStr
AString

Represents ANSI string.

WStr
WString

Represents wide string (unicode string).

Enums

ConvertError

Represents a conversion error.

Type Definitions

ConvertResult