reversing a string test cases I am trying to create a method that reverses a string that will handle every case. So far the cases I have come up with are

""
"abcdef"
"abbbba"
null


I haven't been able to handle these conditions however

escape characters

"\n"
"\t"


Not sure how to make \n or \t into a string

special characters such as

áe


code:

public static String reverseStr(String str) {
    if ( str == null ) {
          return null;
    }
    int len = str.length();
    if (len &lt;= 0) {
        return "";
    }
    char[] strArr = new char[len];
    int count = 0;
    for (int i = len - 1; i &gt;= 0; i--) {
        strArr[count] = str.charAt(i);
        count++;
    }
    return new String(strArr);
}
There is a good overview of string reversal algorithms in this answer. It should explain how special characters like é can be handled. I don't see what's your problem with "\n" and "\t". These are strings already.