Android Utililty Methods String Reverse

List of utility methods to do String Reverse

Description

The list of methods to do String Reverse are organized into topic(s).

Method

Stringreverse(String input)
reverse
StringBuilder output = new StringBuilder();
for (int i = input.length() - 1; i >= 0; i--) {
    output.append(input.charAt(i));
return output.toString();
Stringreverse(String value)
reverse
StringBuilder sb = new StringBuilder();
for (int i = value.length() - 1; i >= 0; --i) {
    sb.append(value.charAt(i));
return sb.toString();
Stringreverse(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();