Skip to content

Instantly share code, notes, and snippets.

@CliveEvans
Created January 14, 2011 17:01
Show Gist options
  • Save CliveEvans/779887 to your computer and use it in GitHub Desktop.
Save CliveEvans/779887 to your computer and use it in GitHub Desktop.
private String removeNewlines(String inputString) {
String returnString = "";
for (int i = 0;i < inputString.length(); i++) {
if ((inputString.charAt(i) == '\r') || (inputString.charAt(i) == '\n')) {
}
else {
returnString = returnString + inputString.charAt(i);
}
}
return returnString;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment