truncateStr maxlen (String xs) = 
    let ellipsis = ("..." :: Text)
        maxlen' = maxlen - (bytelen ellipsis)
    in if (bytelen xs) > maxlen
       then let s = truncateText maxlen' xs 
            in String $ s <> ellipsis
       else String xs
truncateStr maxlen (String xs) = 
    let ellipsis = ("..." :: Text)
        maxlen' = maxlen - (bytelen ellipsis)
    in if (bytelen xs) > maxlen
       then let s = truncateText maxlen' xs 
            in String $ s <> ellipsis
       else String xs
truncateStr maxlen (String xs) = 
    let ellipsis = ("..." :: Text)
        maxlen' = maxlen - (bytelen ellipsis)
    in if (bytelen xs) > maxlen
       then let s = truncateText maxlen' xs 
            in String $ s <> ellipsis
       else String xs