String as IO?

question

#1

If I have a string, how can I treat it like an IO? I have a method that takes an IO and I want to pass a string to it, if at the very least for testing.


#2

Try the IOBuffer() function. It should do exactly what you need.


#3

That’s the ticket. Thanks!


#4

@trans Please mark the reply as solving the problem next time, it’s useful for people to know whether a question still needs an answer. Thanks!


#5

Didn’t know about that. Okay.