Function caps::to_canonical

source ·
pub fn to_canonical(name: &str) -> String
Expand description

Convert an informal capability name into a canonical form.

This converts the input string to uppercase and ensures that it starts with CAP_, prepending it if necessary. It performs no validity checks so the output may not represent an actual capability. To check if it is, pass it to from_str.