[][src]Crate moenster

mønster (n) - pattern.

Simple glob-style pattern matching for strings. Always matches the whole string from beginning to end.

WildcardDescriptionNote
*matches any number of any characters including none
?matches any single characterdoes not handle multi-byte UTF-8 codepoints
[abc]matches one character given in the brackettaken as byte values
[a-z]matches one character from the range given in the bracketrange taken from their byte values
[^abc]matches one character that is not given in the brackettaken as byte values
[^a-z]matches one character that is not from the range given in the bracketrange taken from their byte values

Note: An empty bracket can never match anything.

Example

assert!(stringmatch("m*nster", "mønster"));

Functions

stringmatch

Match a string against the specified pattern.