isValidPosixName
lib.isValidPosixName
Docs pulled from | This Revision | about 1 hour ago
Test whether the given name is a valid POSIX shell variable name.
Inputs
name- 1. Function argument
Type
isValidPosixName :: String -> Bool
Examples
lib.strings.isValidPosixName usage example
isValidPosixName "foo_bar000"
=> true
isValidPosixName "0-bad.jpg"
=> false
Noogle detected
Implementation
The following is the current implementation of this function.
isValidPosixName = name: match "[a-zA-Z_][a-zA-Z0-9_]*" name != null;