About quotation

  • Thread starter Thread starter Tony Johansson
  • Start date Start date
T

Tony Johansson

Hello!

There is a requirement that a method should remove quotation for a value
which is a string.
It could look like for example ""TestValue"" and here if extra quotation
exist
on TestValue remove these which give "TestValue".

So my first question is how to I check if TestValue have extra quotation.
My second question is how do I remove these extra quotation.

Don't ask why it's just a requirement that I have to accept.

//Tony
 
Hello!

There is a requirement that a method should remove quotation for a value
which is a string.
It could look like for example ""TestValue"" and here if extra quotation
exist
on TestValue remove these which give "TestValue".

So my first question is how to I check if TestValue have extra quotation.
My second question is how do I remove these extra quotation.

Since you haven't defined strict rules for what constitutes "extra
quotation", there's no way to tell. What exactly is "extra"? Perhaps
the input was intended to be that way?
 
Back
Top