[][src]Function places::match_impl::is_on_boundary

fn is_on_boundary(text: &str, index: usize) -> bool

port of isOnBoundary from gecko places.

Check whether a character position is on a word boundary of a UTF-8 string (rather than within a word). We define "within word" to be any position between [a-zA-Z] and [a-z] -- this lets us match CamelCase words. TODO: support non-latin alphabets.