2 years ago

#62722

test-img

Anton Nikitsiuk

JS backward string interpolation

I'm going to parse a big custom-formed config from txt to class, adjust it in Form and then save it back. Saving is not a problem, I can use Interpolation and this is awesome.

After this, I just wondered if I can do a backward interpolation, like the destruction of text file content.

So I can get values '1','Boing','green' from this config

1; 0=BMW,1=Volvo
boing;
green;

like this

{car}; 0=BMW,1=Volvo
{plane};
{color};

UPD: It's just an example, and Parsing of this one takes time. Real file has about 1K lines

javascript

parsing

config

string-interpolation

destruction

0 Answers

Your Answer

Accepted video resources