pub fn parse_codepoint_association<'a>(
    line: &'a str,
) -> Result<(Codepoints, &'a str), Error> {
    lazy_static! {
        static ref PARTS: Regex = Regex::new(
            r"(?x)
            ^
            \s*(?P<codepoints>[^\s;]+)\s*;
            \s*(?P<property>[^;\x23]+)\s*
            "
        )
        .unwrap();
    };

    let caps = match PARTS.captures(line.trim()) {
        Some(caps) => caps,
        None => return err!("invalid PropList line: '{}'", line),
    };
    let property = match caps.name("property") {
        Some(property) => property.as_str().trim(),
        None => {
            return err!(
                "could not find property name in PropList line: '{}'",
                line
            )
        }
    };
    Ok((caps["codepoints"].parse()?, property))
}
/// A helper function for parsing a common record format that associates one
/// or more codepoints with a string value.
A helper function for parsing a common record format that associates one
or more codepoints with a string value.
A helper function for parsing a common record format that associates one or more codepoints with a string value .
pub fn parse_codepoint_association<'a>(
    line: &'a str,
) -> Result<(Codepoints, &'a str), Error> {
    lazy_static! {
        static ref PARTS: Regex = Regex::new(
            r"(?x)
            ^
            \s*(?P<codepoints>[^\s;]+)\s*;
            \s*(?P<property>[^;\x23]+)\s*
            "
        )
        .unwrap();
    };
    let caps = match PARTS.captures(line.trim()) {
        Some(caps) => caps,
        None => return err!("invalid PropList line: '{}'", line),
    };
    let property = match caps.name("property") {
        Some(property) => property.as_str().trim(),
        None => {
            return err!(
                "could not find property name in PropList line: '{}'",
                line
            )
        }
    };
    Ok((caps["codepoints"].parse()?, property))
}
pub fn parse_codepoint_association < ' a > ( line : & ' a str , ) -> Result < ( Codepoints , & ' a str ) , Error > { lazy_static ! { static ref PARTS Regex Regex new ( r"(?x)
            ^
            \s*(?P<codepoints>[^\s;]+)\s*;
            \s*(?P<property>[^;\x23]+)\s*
            " ) unwrap ( ) } ; let caps = match PARTS . captures ( line . trim ( ) ) { Some ( caps ) => caps , None => return err ! ( " " line ) , } ; let property = match caps . name ( " " ) { Some ( property ) => property . as_str ( ) . trim ( ) , None => { return err ! ( " " line ) } } ; Ok ( ( caps [ " " ] . parse ( ) ? , property ) ) }
A helper function for parsing a common record format that associates one
or more codepoints with a string value.
A helper function for parsing a common record format that associates one or more codepoints with a string value .
line
&'a str
line
&'a str