• Post Reply Bookmark Topic Watch Topic
  • New Topic

Way to strip / add slashes?  RSS feed

 
Charles OBrien
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello:
In PHP there is a function called addslashes, so slashes are automatically added to a string (" -> \") for an easier way of handling quotes when entering into a database or so, and there is the opposite of it, stripslashes, which removes the slashes from the string (\" -> ").
Would there be a similar way of accomplisihing this within a Java Servlet?
Charles
 
Barry Andrews
Ranch Hand
Posts: 529
C++ Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To my knowledge there is no method for doing this in the SDK API, but you could take it upon yourself to create these methods.
Barry
 
David Weitzman
Ranch Hand
Posts: 1365
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe if you use PreparedStatement you don't need to worry about it (but don't quote me on that).
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!