Clearing serial buffer solved

In my case the lcd screen only holds x number of chars, so all good i wana be able to clear it to then print new input when thats the case but not if no new input comes in.