casing/casing.py
def analyze(var):
    """
    Split the input `var` in each elements.
    
    :param str var: Variable to analyze
    :type var: :py:class:`str`
    
    :returns: **case**: (:py:class:`list`: **1-D list of string**) - Analyze input `var` splited in lowercase
    
    :Example: Import the module and run the function with the variable to analyze.
    
    .. code-block:: python
        :linenos:
    
        import casing
        print(casing.analyze("stringToAnalyze"))
        >>> ['string', 'to', 'analyze']
    """    
    var_list = []
    buffer = ""
    for i, charact in enumerate(var):
        if charact in separators:
            var_list.append(buffer)
            buffer = ""
        elif charact in alphabet.upper():
            if i > 0 and var[i - 1].isupper():
                buffer += charact.lower()
            else:
                var_list.append(buffer)
                buffer = charact.lower()
        elif charact in alphabet:
            buffer += charact
    var_list.append(buffer)
    return list(filter(len, var_list))

    Split the input `var` in each elements.
    
    :param str var: Variable to analyze
    :type var: :py:class:`str`
    
    :returns: **case**: (:py:class:`list`: **1-D list of string**) - Analyze input `var` splited in lowercase
    
    :Example: Import the module and run the function with the variable to analyze.
    
    .. code-block:: python
        :linenos:
    
        import casing
        print(casing.analyze("stringToAnalyze"))
        >>> ['string', 'to', 'analyze']
    
Split the input `var` in each elements.
Split the input ` var ` in each elements .
def analyze(var):
    var_list = []
    buffer = ""
    for i, charact in enumerate(var):
        if charact in separators:
            var_list.append(buffer)
            buffer = ""
        elif charact in alphabet.upper():
            if i > 0 and var[i - 1].isupper():
                buffer += charact.lower()
            else:
                var_list.append(buffer)
                buffer = charact.lower()
        elif charact in alphabet:
            buffer += charact
    var_list.append(buffer)
    return list(filter(len, var_list))
def analyze ( var ) : var_list = [ ] buffer = "" for i , charact in enumerate ( var ) : if charact in separators : var_list . append ( buffer ) buffer = "" elif charact in alphabet . upper ( ) : if i > 0 and var [ i - 1 ] . isupper ( ) : buffer += charact . lower ( ) else : var_list . append ( buffer ) buffer = charact . lower ( ) elif charact in alphabet : buffer += charact var_list . append ( buffer ) return list ( filter ( len , var_list ) )
Split the input `var` in each elements.
Split the input ` var ` in each elements .
"""
    Split the input `var` in each elements.
    
    :param str var: Variable to analyze
    :type var: :py:class:`str`
    
    :returns: **case**: (:py:class:`list`: **1-D list of string**) - Analyze input `var` splited in lowercase
    
    :Example: Import the module and run the function with the variable to analyze.
    
    .. code-block:: python
        :linenos:
    
        import casing
        print(casing.analyze("stringToAnalyze"))
        >>> ['string', 'to', 'analyze']
    """
case**: (:py:class:`list`: **1-D list of string**) - Analyze input `var` splited in lowercase
case ** : ( : py : class : ` list ` : ** 1 - D list of string ** ) - Analyze input ` var ` splited in lowercase
var
Variable to analyze
Variable to analyze
Example
Import the module and run the function with the variable to analyze.
code-block:: python
:linenos.

import casing
print(casing.analyze("stringToAnalyze"))
>>> ['string', 'to', 'analyze']
Import the module and run the function with the variable to analyze . code - block :: python : linenos . import casing print ( casing . analyze ( " stringToAnalyze " )) >>> [ ' string ' ' to ' ' analyze ' ]