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
Required Methods
ⓘImportant traits for PosixShellWords<'a, T>
fn parse_cmdline_words(&mut self) -> PosixShellWords<Self::OutSlice>
Returns an iterator of POSIX-esque command line arguments
Implementations on Foreign Types
impl StrExt for str
[src]
impl StrExt for str
Parse a rust UTF-8 string, yeilding string slices
type OutSlice = str
ⓘImportant traits for PosixShellWords<'a, T>fn parse_cmdline_words(&mut self) -> PosixShellWords<str>
[src]
ⓘImportant traits for PosixShellWords<'a, T>
fn parse_cmdline_words(&mut self) -> PosixShellWords<str>
impl StrExt for [u8]
[src]
impl StrExt for [u8]
Parse a byte slice as a ASCII (or UTF-8/WTF-8/...) string, returning byte slices
type OutSlice = [u8]
ⓘImportant traits for PosixShellWords<'a, T>fn parse_cmdline_words(&mut self) -> PosixShellWords<[u8]>
[src]
ⓘImportant traits for PosixShellWords<'a, T>
fn parse_cmdline_words(&mut self) -> PosixShellWords<[u8]>
impl StrExt for OsStr
[src]
impl StrExt for OsStr
type OutSlice = OsStr
ⓘImportant traits for PosixShellWords<'a, T>fn parse_cmdline_words(&mut self) -> PosixShellWords<Self::OutSlice>
[src]
ⓘImportant traits for PosixShellWords<'a, T>
fn parse_cmdline_words(&mut self) -> PosixShellWords<Self::OutSlice>
impl StrExt for String
[src]
impl StrExt for String
type OutSlice = str
ⓘImportant traits for PosixShellWords<'a, T>fn parse_cmdline_words(&mut self) -> PosixShellWords<Self::OutSlice>
[src]
ⓘImportant traits for PosixShellWords<'a, T>
fn parse_cmdline_words(&mut self) -> PosixShellWords<Self::OutSlice>