Say you need to write a function such that you have string a and string b. The function argument is a concatenation of string a and string b. The function prints string a and string b separately. I'll explain.
For example one can think of a naive solution such that 'x' will be a separator character and so if we want to print "hello world" for example we create a function that prints everything as string a until it encounters an 'x' char and than it knows that string b is starting. So our argument will be something like:
But this eliminates the option of using 'x' as a char in our String.
I am sure that there is a simple solution to this that I am not getting.
Not looking for code, just your idea. The code will be easy to implement.