def extract_text_data(text):
    """
    Extract the data of the text : total of characters, total of words, total of lines

    :param text: The text to operate on
    :return: an object containing th text data
    """
    total_char = 0
    total_words = 0
    total_lines = 0

    lines = text.split('\n')

    for line in lines:
        total_lines += 1
        words = line.split()
        for word in words:
            total_words += 1
            total_char += len(word)
        total_char += len(words) - 1

    return {
        "total_char": total_char,
        "total_words": total_words,
        "total_lines": total_lines
    }