Serial flush - seems I can't get it to clear data

I'm not sure what you mean, most of the time the data received is fine - by if I am in a delay when the data is sent, it doesn't fully get read:

example:

AR255G255B255
AR255G255B255
AR255G255B255
AR255G255B255
AR255G255B255
AR
AR255G255B255
AR255G255B255
AR255G255B255
AR255G255B255
AR255G255B255
AR255G255B255
AR255G255B255
AR255G255B255

I wanted to get rid of the delay near the bottom of the code, so the delay in the void only gets run when dataIn string is not empty.