I agree, the point that I want to write such a function is to avoid using DLLs which would be no problem but not pretty nice.

@Stromausfall: Problem is that one line might contain "\n" in between not only at the end.

@Germanunkol: I think your solution is the best even if it is not as beautiful as I wanted.