updated documentation

the regexp is not having any pattern to match a space. Hence changed the documentation accordingly.
This commit is contained in:
Gaddeti Rohit Babu
2019-11-02 13:11:52 +05:30
committed by GitHub
parent a9b1277377
commit e90fa5db21

View File

@ -5,7 +5,7 @@ tags: string,regexp,intermediate
Converts a string to camelcase.
Use `re.sub()` to replace any `-`,`_` or ` ` (space) with a space, using the regexp `r"(_|-)+"`.
Use `re.sub()` to replace any `-` or `_` with a space, using the regexp `r"(_|-)+"`.
Use `title()` to capitalize the first letter of each word convert the rest to lowercase.
Finally, use `replace()` to remove spaces between words.