Remove Last element from a Character Array in Android?
What i 开发者_C百科Have: At present i have a String variable i-e:
String str_StoreValue;
I have appended it with some string values and converted it into a Character Array by doing this:
char[] ch_TestArray = str_StoreValue.toCharArray();
What i want: i want to remove the last element of this char[] ch_TestArray
.
Can somebody help me out. I'm new to android.
This is just easier:
char[] ch_TestArray = str_StoreValue.substring(0, str_StoreValue.length()-1).toCharArray();
精彩评论