r"""
    Args:
        underscore_case (?):

    Returns:
        str: camel_case_str

    CommandLine:
        python -m utool.util_str --exec-to_camel_case

    References:
        https://en.wikipedia.org/wiki/CamelCase

    Example:
        >>> # ENABLE_DOCTEST
        >>> from utool.util_str import *  # NOQA
        >>> underscore_case = 'underscore_funcname'
        >>> camel_case_str = to_camel_case(underscore_case)
        >>> result = ('camel_case_str = %s' % (str(camel_case_str),))
        >>> print(result)
        camel_case_str = UnderscoreFuncname

def to_camel_case(underscore_case, mixed=False):
    r"""
    Args:
        underscore_case (?):

    Returns:
        str: camel_case_str

    CommandLine:
        python -m utool.util_str --exec-to_camel_case

    References:
        https://en.wikipedia.org/wiki/CamelCase

    Example:
        >>> # ENABLE_DOCTEST
        >>> from utool.util_str import *  # NOQA
        >>> underscore_case = 'underscore_funcname'
        >>> camel_case_str = to_camel_case(underscore_case)
        >>> result = ('camel_case_str = %s' % (str(camel_case_str),))
        >>> print(result)
        camel_case_str = UnderscoreFuncname
    """
    thresh = 0 if mixed else -1
    words = underscore_case.split('_')
    words2 = [
        word[0].upper() + word[1:]
        if count > thresh else
        word
        for count, word in enumerate(words)
    ]
    camel_case_str = ''.join(words2)
    return camel_case_str