Trying to read until the program finds a string.

I have looked all around for a good way to do this and nothing seems to work.
What I want to is when I upload my G-code file, it reads through until it it find the string ";TIME:".
It only needs to look at the lines beginning with ";" as those are the comment lines. I have tried readStringUntil(), read(), using a buffer like suggested here: arduino uno - Read only one line in SD card - Arduino Stack Exchange.

It is from an SD card.

I am very stuck on this so any help is appreciated,
Dream.

With a bit of effort I was able to make it work with:

File file = SD.open(filename);
 if(file){
 Serial.println("File Opened!");
 while (file.available()) {
   buffer = file.readStringUntil('\n');      
   if(buffer.indexOf(";TIME:") >= 0){
     Serial.println(buffer);
   }
 }
}