Reading from a .txt file until a certain character is detected

I am making a random name generator of sorts, but in the list of names I have, each name is followed by a some numbers. Is there a way that I can cut out anything read after a space character is detected?

e.g

SMITH 1.006 1.006 1

Try string.split. Check it out here from the source. String.Split Method (System) | Microsoft Learn

-Good luck