Skip to main content

find_tags

Function find_tags 

Source
pub fn find_tags<'d>(doc: &'d PhpDoc, name: &str) -> Vec<&'d PhpDocTag>
Expand description

Find all tags with the given name.

ยงExample

use phpdoc_parser::{parse, find_tags};
let doc = parse("/**\n * @param int $x\n * @param string $y\n */");
assert_eq!(find_tags(&doc, "param").len(), 2);