Skip to main content

get_tag

Function get_tag 

Source
pub fn get_tag(
    tag_name: &str,
    target: &[[String; 2]],
) -> Option<(usize, String)>
Expand description

Gets a tag value from the specified tag list by name.

从指定标签列表中根据名称获取标签值。

§Arguments

  • tag_name - The name of the tag to retrieve
  • target - The list of tags to search through

§Returns

Returns Some((index, value)) if the tag is found, or None if not found.

§参数

  • tag_name - 要检索的标签名称
  • target - 要搜索的标签列表

§返回值

如果找到标签则返回Some((索引, 值)),否则返回None