1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/// Checks if string starts with any of the given values.
///
/// # Examples
/// ```rust
/// use pareg_core::starts_any;
///
/// let s = "ah";
/// assert!(starts_any!("hello", "he", s));
/// assert!(starts_any!("ahoj", "he", s));
/// assert!(!starts_any!("greetings", "he", s));
/// ```
/// Checks if string is key value with the given separator or just key with one
/// of the keys.
///
/// If you want the separator to be mandatory use [`starts_any`].
///
/// # Examples
/// ```rust
/// use pareg_core::has_any_key;
///
/// let s = "ahoj";
/// let sep = ':';
/// assert!(has_any_key!("hello", '=', "hello", s));
/// assert!(has_any_key!("hello=", '=', "hello", s));
/// assert!(has_any_key!("ahoj:lol", sep, "hello", s));
/// assert!(!has_any_key!("greeting=ahoj", '=', "greet", s));
/// ```