We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I am trying to write a function such that it takes an inputted String and creates a new String 'count' characters long. I have this so far:
String stringFront(String s, int count)
{
for (int l=0; l<count; l++)
{
}
}
For example, String stringFront("this is the example", 7) would result in "this is".
Answers
So something like this?
Now that I have stringFront working, I want to do this function using the previous:
https://Processing.org/reference/split_.html
The split function does not allow for a set number of words before each split, so it splits the entire entered String into individual words since my delimiter is ' '. I am hoping to split into a new line every 5 words.
Check my second post on this post as I show how to print 5 words per line:
https://forum.processing.org/two/discussion/comment/102725#Comment_102725
Kf