Pretty: simplified definition of realLength.
This commit is contained in:
parent
9614835ea7
commit
86d8e1ef89
1 changed files with 1 additions and 1 deletions
|
@ -554,4 +554,4 @@ charWidth c =
|
|||
-- | Get real length of string, taking into account combining and double-wide
|
||||
-- characters.
|
||||
realLength :: String -> Int
|
||||
realLength = foldr (\a b -> charWidth a + b) 0
|
||||
realLength = sum . map charWidth
|
||||
|
|
Loading…
Add table
Reference in a new issue