I have a variable: X
I have a text: " … $X…" from a text file.
What I can do, to substitute the value of variable X into the text?
I know how it can be done directly in the code: text = " bla bla bla $x … ", But if the text is been reding from the file.txt. How I can do it?
text = read(“test.txt”, String)
X = 5;
do something for substitule value of X into the text
println(text)