Trait cmdline_words_parser::StrExt[][src]

pub trait StrExt {
    type OutSlice: ?Sized + StrExtOut;
    fn parse_cmdline_words(&mut self) -> PosixShellWords<Self::OutSlice>;
}

Extension trait providing mutable command-line parsing on strings

use cmdline_words_parser::StrExt;
let mut cmdline = String::from(r"Hello\ World 'Second Argument'");
let mut parse = cmdline.parse_cmdline_words();
assert_eq!( parse.next(), Some("Hello World") );
assert_eq!( parse.next(), Some("Second Argument") );
assert_eq!( parse.next(), None );

Associated Types

Output slice type (e.g str or OsStr)

Required Methods

Important traits for PosixShellWords<'a, T>

Returns an iterator of POSIX-esque command line arguments

Implementations on Foreign Types

impl StrExt for str
[src]

Parse a rust UTF-8 string, yeilding string slices

Important traits for PosixShellWords<'a, T>

impl StrExt for [u8]
[src]

Parse a byte slice as a ASCII (or UTF-8/WTF-8/...) string, returning byte slices

Important traits for PosixShellWords<'a, T>

impl StrExt for OsStr
[src]

Important traits for PosixShellWords<'a, T>

impl StrExt for String
[src]

Important traits for PosixShellWords<'a, T>

Implementors