How would I go about deleted everything after a certain character?
For example, if I have the phrase "Luck is good", I want to omit everything from the first space to the end, so that the output is just "Luck".
I looked at substr, but it seems that you have to provide the number of the character. I don't know where the space will actually be... could be after 4 characters, could be after 10.
Thanks.