Skip to main content

enclosed

Function enclosed 

Source
fn enclosed<'a>(s: &'a str, prefix: &str, close: char) -> Option<&'a str>
Expand description

The body of s when it is exactly prefixclose, where close is the bracket matching the one prefix ends with and lands on the final character.

This is what separates map[text=>int] from map[text=>int][], whose matching bracket closes early.