Logo

Programming-Idioms

History of Idiom 110 > diff from v9 to v10

Edit summary for version 10 by :
New Haskell implementation by user [JH]

Version 9

2016-01-15, 15:49:18

Version 10

2016-02-16, 19:14:40

Idiom #110 Check if string is blank

Set boolean blank to true if string s is empty, or null, or contains only whitespace ; false otherwise.

Idiom #110 Check if string is blank

Set boolean blank to true if string s is empty, or null, or contains only whitespace ; false otherwise.

Imports
import Data.Char (isSpace)
Code
b = null (dropWhile isSpace s)