Skip to content

Instantly share code, notes, and snippets.

@sanjitk7
Created May 17, 2020 06:10
Show Gist options
  • Save sanjitk7/04cae0a6e07f4b12f90d9894acf3aecd to your computer and use it in GitHub Desktop.
Save sanjitk7/04cae0a6e07f4b12f90d9894acf3aecd to your computer and use it in GitHub Desktop.
Function to Check if String is in camelCase
#check if the word is in camel case
#ip: "helloWorld"
#op: True
def isCamelCase(word):
#check for whitespaces
res = bool(re.search(r"\s", word))
if (not res):
x = re.search(r"^[a-z](.+?)([A-Z])",word)
if (x):
return True
return False
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment