Im looking to make a dynamic array of strings coming from the keyboard input...
Looking at concat() and join(), but it's not too clear to me on how to do this...
Something along the lines of ...
void draw() {
char current[] = {key};
String[] sentence = new String[keyHit];
for ( int i = 0; i < keyHit; i++ ) {
sentence[i] = currentKey;
}
String input = new String(current);
text(input, x, y, etc);
}
void keyPressed() {
if (key != CODED) {
currentKey = (char)key;
keyHit = keyHit +1;
}
???
A little lost... thx.
EDIT: maybe this isn't so clear... what I want to do is to make a word (or a sentence)... so a String that takes characters from a keyPressed event and concatenates them.
EDIT #2: I think that I want append()... my bad.
1