mirror of
https://hub.njuu.cf/TheAlgorithms/Python.git
synced 2023-10-11 13:06:12 +08:00
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
24125e3b7d
commit
67ef6182fe
@ -10,6 +10,7 @@ def is_upper(string):
|
||||
"""
|
||||
return all(ord(char) >= 65 and ord(char) <= 90 for char in string)
|
||||
|
||||
|
||||
def is_lower(string):
|
||||
"""
|
||||
Check if all characters in the string are lowercase letters.
|
||||
@ -22,6 +23,7 @@ def is_lower(string):
|
||||
"""
|
||||
return all(ord(char) >= 97 and ord(char) <= 122 for char in string)
|
||||
|
||||
|
||||
def is_alpha(string):
|
||||
"""
|
||||
Check if all characters in the string are alphabetical (letters).
|
||||
@ -34,6 +36,7 @@ def is_alpha(string):
|
||||
"""
|
||||
return all(char.isalpha() for char in string)
|
||||
|
||||
|
||||
def is_alnum(string):
|
||||
"""
|
||||
Check if all characters in the string are alphanumeric (letters or digits).
|
||||
@ -46,6 +49,7 @@ def is_alnum(string):
|
||||
"""
|
||||
return all(char.isalnum() for char in string)
|
||||
|
||||
|
||||
def is_decimal(string):
|
||||
"""
|
||||
Check if all characters in the string are decimal digits.
|
||||
@ -58,6 +62,7 @@ def is_decimal(string):
|
||||
"""
|
||||
return all(char.isdigit() for char in string)
|
||||
|
||||
|
||||
def is_space(string):
|
||||
"""
|
||||
Check if all characters in the string are whitespace characters.
|
||||
@ -70,6 +75,7 @@ def is_space(string):
|
||||
"""
|
||||
return all(char.isspace() for char in string)
|
||||
|
||||
|
||||
def is_title(string):
|
||||
"""
|
||||
Check if the string is in title case (first letter of each word is capital).
|
||||
|
Loading…
x
Reference in New Issue
Block a user