We’ve all seen katas that ask for conversion from snake-case to camel-case, from camel-case to snake-case, or from camel-case to kebab-case — the possibilities are endless.
But if we don’t know the case our inputs are in, these are not very helpful.
### Task:
So the task here is to implement a function (called `id` in Ruby/Crystal/JavaScript/CoffeeScript and `case_id` in Python/C) that takes a string, `c_str`, and returns a string with the case the input is in. The possible case types are “kebab”, “camel”, and ”snake”. If none of the cases match with the input, or if there are no 'spaces' in the input (for example in snake case, spaces would be '_'s), return “none”. Inputs will only have letters (no numbers or special characters).
### Some definitions
Kebab case: `lowercase-words-separated-by-hyphens`
Camel case: `lowercaseFirstWordFollowedByCapitalizedWords`
Snake case: `lowercase_words_separated_by_underscores`
### Examples:
```python
case_id(“hello-world”) #=> “kebab”
case_id(“hello-to-the-world”) #=> “kebab”
case_id(“helloWorld”) #=> “camel”
case_id(“helloToTheWorld”) #=> “camel”
case_id(“hello_world”) #=> “snake”
case_id(“hello_to_the_world”) #=> “snake”
case_id(“hello__world”) #=> “none”
case_id(“hello_World”) #=> “none”
case_id(“helloworld”) #=> “none”
case_id(“hello-World”) #=> “none”
```
Also check out my other creations — [Split Without Loss](https://www.codewars.com/kata/split-without-loss), [Adding Fractions](https://www.codewars.com/kata/adding-fractions),
[Random Integers](https://www.codewars.com/kata/random-integers), [Implement String#transpose](https://www.codewars.com/kata/implement-string-number-transpose), [Implement Array#transpose!](https://www.codewars.com/kata/implement-array-number-transpose), [Arrays and Procs #1](https://www.codewars.com/kata/arrays-and-procs-number-1), and [Arrays and Procs #2](https://www.codewars.com/kata/arrays-and-procs-number-2)
from string import (ascii_lowercase as ASCII_LOW,
                    ascii_letters as ASCII_LET)

def is_kebab_case(str_):
    for char in str_:
        if char not in (ASCII_LOW + '-'):
            return False
    if '' in str_.split('-'):
        return False
    return True

def is_camel_case(str_):
    for char in str_:
        if char not in ASCII_LET:
            return False
    if str_[0].isupper():
        return False
    return True
    
def is_snake_case(str_):
    for char in str_:
        if char not in (ASCII_LOW + '_'):
            return False
    if '' in str_.split('_'):
        return False
    return True

def case_id(c_str):
    for func in (is_kebab_case, is_camel_case, is_snake_case):
        if func(c_str): 
            return {'is_kebab_case': 'kebab',
                    'is_camel_case': 'camel',
                    'is_snake_case': 'snake'}[func.__name__]
    return 'none'
from string import (ascii_lowercase as ASCII_LOW,
                    ascii_letters as ASCII_LET)

def is_kebab_case(str_):
    for char in str_:
        if char not in (ASCII_LOW + '-'):
            return False
    if '' in str_.split('-'):
        return False
    return True

def is_camel_case(str_):
    for char in str_:
        if char not in ASCII_LET:
            return False
    if str_[0].isupper():
        return False
    return True
    
def is_snake_case(str_):
    for char in str_:
        if char not in (ASCII_LOW + '_'):
            return False
    if '' in str_.split('_'):
        return False
    return True

def case_id(c_str):
    for func in (is_kebab_case, is_camel_case, is_snake_case):
        if func(c_str): 
            return {'is_kebab_case': 'kebab',
                    'is_camel_case': 'camel',
                    'is_snake_case': 'snake'}[func.__name__]
    return 'none'