By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,991 Members | 1,887 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,991 IT Pros & Developers. It's quick & easy.

About quotation

P: n/a
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

Nov 21 '08 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On Thu, 20 Nov 2008 23:07:07 -0800, Tony Johansson
<t.*********@logica.comwrote:
[...]
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.
The String class has several methods that you might find useful. Things
like Contains(), IndexOf(), Remove(), etc.

Pete
Nov 21 '08 #2

P: n/a
On Nov 21, 10:07*am, "Tony Johansson" <t.johans...@logica.comwrote:
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?
Nov 21 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.