(string)
| 1038 | |
| 1039 | @staticmethod |
| 1040 | def capitalize(string): # first character only, rest characters unchanged |
| 1041 | # the native pythonic .capitalize() method lowercases all other characters |
| 1042 | # which is an unwanted behaviour, therefore we use this custom implementation |
| 1043 | # check it yourself: print('foobar'.capitalize(), 'fooBar'.capitalize()) |
| 1044 | if string: |
| 1045 | return string[0].upper() + string[1:] |
| 1046 | return string |
| 1047 | |
| 1048 | @staticmethod |
| 1049 | def strip(string): |
no outgoing calls