diff python/utils.py @ 742:fe71639f1ee7 dev

merge and added function to up-/lower-case strings
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Fri, 28 Aug 2015 10:39:15 -0400
parents 5b91b8d97cf3
children 10dbab1e871d
line wrap: on
line diff
--- a/python/utils.py	Fri Aug 28 10:38:08 2015 -0400
+++ b/python/utils.py	Fri Aug 28 10:39:15 2015 -0400
@@ -13,6 +13,15 @@
 datetimeFormat = "%Y-%m-%d %H:%M:%S"
 
 #########################
+# Strings
+#########################
+
+def upperCaseFirstLetter(s):
+    words = s.split(' ')
+    lowerWords = [w[0].upper()+w[1:].lower() for w in words]
+    return ' '.join(lowerWords)
+
+#########################
 # Enumerations
 #########################