def underscore_to_camel(
        text: str,
        lower_first: bool = True
) -> str:
    """Convert a string with words separated by underscores to a camel-cased
    string.

    Args:
        text (:obj:`str`): The camel-cased string to convert.
        lower_first (:obj:`bool`, optional): Lowercase the first character.
            Defaults to :obj:`True`.

    :rtype: :obj:`str`

    Examples:
        >>> from flutils.strutils import underscore_to_camel
        >>> underscore_to_camel('foo_bar')
        'fooBar'
        >>> underscore_to_camel('_one__two___',lower_first=False)
        'OneTwo'
    """
    out = ''.join([x.capitalize() or '' for x in text.split('_')])
    if lower_first is True:
        return out[:1].lower() + out[1:]
    return out