upper-case first char of buddy name

This commit is contained in:
Joey Hess 2012-11-12 13:27:30 -04:00
parent 5ab6219436
commit e10137b4da

View file

@ -23,6 +23,10 @@ genBuddyKey j = BuddyKey $ formatJID $ baseJID j
buddyName :: JID -> Text
buddyName j = maybe (T.pack "") strNode (jidNode j)
ucFirst :: Text -> Text
ucFirst s = let (first, rest) = T.splitAt 1 s
in T.concat [T.toUpper first, rest]
{- Summary of info about a buddy.
-
- If the buddy has no clients at all anymore, returns Nothing. -}