I want to ask that how I can split the string text from an textarea into 64-bit each parts in char?
Eg:
'I here try to ask how to do the string tokenizer'
'I here t' || 'ry to as' || ...
String tokenizer
Started by gandudu, Jun 26 2010 06:02 AM
2 replies to this topic
#1
Posted 26 June 2010 - 06:02 AM
|
|
|
#2
Posted 26 June 2010 - 07:01 AM
If I understand you correctly:
String input = textArea.getText();
String input1 = input.subString(0,63);
String input2 = input.subString(64, 127);
That should split a 128 character string into 2, 64 character strings. From there, it is even possible to send them to a char[] with .toCharArray(), if you want.
Is this what you want to do?
String input = textArea.getText();
String input1 = input.subString(0,63);
String input2 = input.subString(64, 127);
That should split a 128 character string into 2, 64 character strings. From there, it is even possible to send them to a char[] with .toCharArray(), if you want.
Is this what you want to do?
#3
Posted 26 June 2010 - 09:48 AM
Another method would be to use StringInputStream and read out 8 chars at a time. Are you implementing some sort of cipher?


Sign In
Create Account


Back to top









