Advertisement
Ankhwatcher

SanitizeText

Apr 4th, 2013
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.23 KB | None | 0 0
  1. static public String sanitizeText(String input) {
  2.         String output = "";
  3.         for (int i = 0; i < input.length(); i++) {
  4.             if (input.charAt(i) == '\'') {
  5.                 output += "\'";
  6.             }
  7.             output += input.charAt(i);
  8.         }
  9.         return output;
  10.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement