fix partial isSingleQuoted/isDoubleQuoted functions
This commit is contained in:
parent
c24609f468
commit
0cb0c61fcb
@ -97,8 +97,11 @@ whitespacechars = " \t\n\r"
|
|||||||
stripquotes :: String -> String
|
stripquotes :: String -> String
|
||||||
stripquotes s = if isSingleQuoted s || isDoubleQuoted s then init $ tail s else s
|
stripquotes s = if isSingleQuoted s || isDoubleQuoted s then init $ tail s else s
|
||||||
|
|
||||||
isSingleQuoted s = head s == '\'' && last s == '\''
|
isSingleQuoted s@(_:_:_) = head s == '\'' && last s == '\''
|
||||||
isDoubleQuoted s = head s == '"' && last s == '"'
|
isSingleQuoted _ = False
|
||||||
|
|
||||||
|
isDoubleQuoted s@(_:_:_) = head s == '"' && last s == '"'
|
||||||
|
isDoubleQuoted _ = False
|
||||||
|
|
||||||
unbracket :: String -> String
|
unbracket :: String -> String
|
||||||
unbracket s
|
unbracket s
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user