1: # Remove disallowed characters from a string, for use as a name 2: { lib }: 3: 4: with builtins; 5: with lib; 6: stringAsChars (c: if elem c (lowerChars ++ upperChars) then c else "")