List of utility methods to do String Reverse
String | reverse(String input) reverse StringBuilder output = new StringBuilder(); for (int i = input.length() - 1; i >= 0; i--) { output.append(input.charAt(i)); return output.toString(); |
String | reverse(String value) reverse StringBuilder sb = new StringBuilder(); for (int i = value.length() - 1; i >= 0; --i) { sb.append(value.charAt(i)); return sb.toString(); |
String | reverse(final String s) reverse final StringBuilder builder = new StringBuilder(s); for (int i = 0; i < s.length(); ++i) { builder.setCharAt(i, s.charAt(s.length() - 1 - i)); return builder.toString(); |