[][src]Function freedesktop_categories::is_category

pub fn is_category(name: &str) -> bool

Returns whether the given string is a valid category.

This function does not differentiate between different kinds of categories. Semicolon-delimited category sets such as Foo;Bar;Baz are not counted by this function.

Example

assert!(is_category("AudioVideo"));
assert!(is_category("Office"));
assert!(is_category("System"));