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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top