Skip to main content

CharExt

Trait CharExt 

Source
pub trait CharExt {
    // Required methods
    fn is_simple_ws(self) -> bool;
    fn simple_ws_len(self) -> u8;
}

Required Methods§

Source

fn is_simple_ws(self) -> bool

Returns true if this is a whitespace character that is commonly typed. Includes space, tab, newline, and carriage return.

Source

fn simple_ws_len(self) -> u8

Returns the length of the given whitespace character, where a tab counts as 4 spaces and all other simple whitespace count as 1.

All other characters return a length of 0.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl CharExt for u8

Implementors§