first_letter_range

Function first_letter_range 

Source
fn first_letter_range(text: &str) -> Range<usize> 
Expand description

Computes the range of the first letter.

The range includes any preceding punctuation and white space, and any trailing punctuation. Any non-punctuation following the letter/number/symbol of first-letter ends the range. Intervening spaces within trailing punctuation are not supported yet.

If the resulting range is empty, no compatible first-letter text was found.

https://drafts.csswg.org/css-pseudo/#first-letter-pattern