I have built a presenter class whose only job is to convert a given array into a string. I am test driving the solution, so I started with "[nil, nil, nil]"
but each nil
will eventually be replaced with letter. That functionality is being handled by another class.
I am trying now to build an interface whose only job is to convert that string back to an array. So I will need to convert e.g. "[\"a\", \"b\", nil]"
back to ["a", "b", nil]
. But I am stuck.
For example, I'd like to convert
"[nil, nil, nil]"
to
[nil, nil, nil]
How could I do it?
"[nil,nil,nil]"
then you don't need to convert it all - just type[nil,nil,nil]
. – Max Jun 19 at 16:16