forge_fmt::string

Trait QuotedStringExt

Source
pub trait QuotedStringExt {
    // Required method
    fn quote_state_char_indices(&self) -> QuoteStateCharIndices<'_> ;

    // Provided methods
    fn quoted_ranges(&self) -> QuotedRanges<'_>  { ... }
    fn is_quoted(&self) -> bool { ... }
}
Expand description

Helpers for iterating over quoted strings

Required Methods§

Source

fn quote_state_char_indices(&self) -> QuoteStateCharIndices<'_>

Returns an iterator of characters, indices and their quoted string state.

Provided Methods§

Source

fn quoted_ranges(&self) -> QuotedRanges<'_>

Returns an iterator of quoted string ranges.

Source

fn is_quoted(&self) -> bool

Check to see if a string is quoted. This will return true if the first character is a quote and the last character is a quote with no non-quoted sections in between.

Implementations on Foreign Types§

Source§

impl QuotedStringExt for str

Implementors§

Source§

impl<T> QuotedStringExt for T
where T: AsRef<str>,