Browse Source

added capitalizeFirst

Darren Ranalli 20 years ago
parent
commit
c0a68a536f
1 changed files with 3 additions and 0 deletions
  1. 3 0
      direct/src/showbase/PythonUtil.py

+ 3 - 0
direct/src/showbase/PythonUtil.py

@@ -736,6 +736,9 @@ def printProfile(filename=PyUtilProfileDefaultFilename,
             s.print_callees(lines)
             s.print_callers(lines)
 
+def capitalizeFirst(str):
+    return '%s%s' % (string.upper(str[0]), str[1:])
+
 def getSetterName(valueName, prefix='set'):
     # getSetterName('color') -> 'setColor'
     # getSetterName('color', 'get') -> 'getColor'