开发者

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();
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜