projects
/
python_utils.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix typo.
[python_utils.git]
/
string_utils.py
diff --git
a/string_utils.py
b/string_utils.py
index 08995765411a22bf5272bdae4bdee41b20312bc0..a2f46332156e0c5fc41f3db8a8228a149272651c 100644
(file)
--- a/
string_utils.py
+++ b/
string_utils.py
@@
-857,6
+857,10
@@
def words_count(in_str: str) -> int:
return len(WORDS_COUNT_RE.findall(in_str))
return len(WORDS_COUNT_RE.findall(in_str))
+def word_count(in_str: str) -> int:
+ return words_count(in_str)
+
+
def generate_uuid(omit_dashes: bool = False) -> str:
"""
Generated an UUID string (using `uuid.uuid4()`).
def generate_uuid(omit_dashes: bool = False) -> str:
"""
Generated an UUID string (using `uuid.uuid4()`).
@@
-876,7
+880,9
@@
def generate_random_alphanumeric_string(size: int) -> str:
Returns a string of the specified size containing random
characters (uppercase/lowercase ascii letters and digits).
Returns a string of the specified size containing random
characters (uppercase/lowercase ascii letters and digits).
- random_string(9) # possible output: "cx3QQbzYg"
+ >>> random.seed(22)
+ >>> generate_random_alphanumeric_string(9)
+ '96ipbNClS'
"""
if size < 1:
"""
if size < 1: