splitting text area into rows/lines

Discussion in 'Computer Science & Culture' started by desmiserables, Jun 20, 2009.

Thread Status:
Not open for further replies.
  1. desmiserables Registered Member

    Messages:
    1
    i have a textarea where a user can enter free flow text.I want to seperate out lines/occurences in my java class based on the below conditions:
    Unless the user presses the enter key i want to get substrings(texts) of 15 characters each or else whenever the user presses enter i want to seperate that part out and start again counting till 15 to get a new splittted substring till i reach the end of the free flow text/string.
    Eg,
    If user enters:

    Heloo i want
    enter key to be caught.

    So i want this text to be seperated into the below substrings:
    1. Hello i want(assuming the user pressed enter key at this point)
    2. enter key to be(as the limit is 15)
    3. caught
     
Thread Status:
Not open for further replies.

Share This Page