on master help sign in
Graphics.Text.Width: typos
commitfa9a9b9ca2d1b3aa77e757c5356a6edc0b04ed64 authorJonathan Daugherty <cygnus@foobox.com> dateSun 22 Jan 2017, 15:37 (10 years ago) parent8bf91da
1 file changed+2−2
src/Graphics/Text/Width.hs+2−2
src/Graphics/Text/Width.hs+2−2
@@ -23,11 +23,11 @@ wcswidth = sum . map wcwidth
2323-- width needs to be implemented.
2424
2525-- | Returns the display width of a character. Assumes all characters
26−-- with unknown widths are 0 width
26+-- with unknown widths are 0 width.
2727safeWcwidth :: Char -> Int
2828safeWcwidth = max 0 . wcwidth
2929
3030-- | Returns the display width of a string. Assumes all characters with
31−-- unknown widths are 0 width
31+-- unknown widths are 0 width.
3232safeWcswidth :: String -> Int
3333safeWcswidth = sum . map safeWcwidth