Did DA considered to add a function such as isNonEmpty

G-d willing

Hello,
Would you consider adding another function to the DA.Text lib a function such as:

isNonEmptyText: Text -> Bool
isNonEmptyText text = (not . Text.isEmpty) text

This is something that I do quite often, and instead of repeating this code in every place I use it, or placing it in a separated package, this way all my packages will use it, sounds a bit too much.

Thanks,

Hi @cohen.avraham,

you could as well define it as

    isNonEmptyText : Text -> Bool
    isNonEmptyText = (/=) ""

or simply use text /= "" instead of isNonEmptyText text.

Hope that helps,
Johan

Thanks @Johan_Sjodin for your reply.
I am aware of this, but I was curious about a dedicated function for it like there is for isEmpty
Anyway, thanks again

It is open source. :slight_smile: Here is an implementation: