blob: 691093679252c734b4dc771bb5be4f9127dbfd0a (
plain)
1
2
3
4
5
6
7
|
# Should take any string, and replace all non-character letters with
# dashes, and downcase everything.
function xorg::normalize_filename (
String $name,
) >> String {
$name.downcase().regsubst(/[^a-z0-9]/, '-')
}
|