August 28th, 2002, 04:43 PM
capturing "enter" command in a string
hello..i want a user to type a para and input that into my java program. But i am not able to caputre the 'enter' and so i get one long line of string. I am using stringbuffer to do this!
August 28th, 2002, 07:48 PM
Are they entering the text in a textarea? If they are, the lines will be terminated with "\n".
August 28th, 2002, 09:16 PM
NO THEY ARE NOT....they are simply typing it a shell..and pressing enter..and thsi text is taken in by the java program and stored in a StringBuffer.
August 28th, 2002, 10:22 PM
Ok. Look for "\n" or "\r\n" depending on what platform you're running on.