serial read new line

Hello
I am trying to receive data from serial port ( serial.read) and then convert it into string.
The data received must be cleared from the buffer as soon as i receive new data from serial port.
Request to solve the problem asap

There are lots of examples out there - what is the particular problem you're having?

Post the code you have already tried and explain why it is not doing whata you want.

This demo and this one may have useful bits.

...R