<reponame>mpmuc84/helper-scripts<filename>lib/input_output/read_file.py
import io


def read_file(file_path):
    """
    Return the content of a file as a string without newlines.

    :param file_path: The path to the file
    :type file_path: str
    :return: File content
    :rtype: str
    """

    file_string = ''

    with io.open(file_path, 'r', newline='', encoding='utf8') as file:
        for line in file:
            file_string = file_string + line.rstrip('\n')

    return file_string
