pub fn new_pattern(prefix: Option<&str>, suffix: Option<&str>) -> StringExpand description
Create new pattern string based on prefix and suffix。
The rule is similar to event.NewPattern in the Go version:
- If a prefix is provided and does not end with ‘’, ‘’ is appended.
- If a suffix is provided and does not start with ‘’, then prefix ‘’.
- Replace “**” with “*”.