Design Architecture for Utility Functions #2
1 changed files with 10 additions and 0 deletions
10
utils/string_utils.py
Normal file
10
utils/string_utils.py
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
def capitalize_first_letter(s):
|
||||||
|
"""Capitalizes the first letter of a string."""
|
||||||
|
if not s:
|
||||||
|
return s
|
||||||
|
return s[0].upper() + s[1:]
|
||||||
|
|
||||||
|
|
||||||
|
def reverse_string(s):
|
||||||
|
"""Reverses the given string."""
|
||||||
|
return s[::-1]
|
||||||
Loading…
Add table
Add a link
Reference in a new issue