Skip to main content

has_chars

Function has_chars 

Source
pub fn has_chars<'a>(
    target: impl MatchTarget<'a>,
    chars: &[char],
    any: bool,
    ignore_case: bool,
) -> bool
Expand description

扫描输入文本是否包含指定的字符集合。

§参数

  • chars: 需要查找的字符数组。
  • any: 如果为 true,只要出现 chars 中的任意一个字符即算匹配成功; 如果为 false,则必须包含 chars 中的所有不同字符才算成功。
  • ignore_case: 是否忽略 ASCII 大小写。