From 044aee255fe74ae5eb70e64a8ee412402e2364be Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 12 Nov 2012 13:27:30 -0400 Subject: upper-case first char of buddy name --- Assistant/XMPP/Buddies.hs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Assistant/XMPP') diff --git a/Assistant/XMPP/Buddies.hs b/Assistant/XMPP/Buddies.hs index 7383c38d9..0c466e51c 100644 --- a/Assistant/XMPP/Buddies.hs +++ b/Assistant/XMPP/Buddies.hs @@ -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. -} -- cgit v1.2.3