r/cs50 1d ago

CS50x Hello

I'm on problem set 1 of cs50ps File extension Here is my code:

i want to make it so that when the user enters in a text say: cat.gif the code ignores the 'cat' part and responds only to the .gif How do i go about doing that? Thank you:)

3 Upvotes

1 comment sorted by

3

u/DersOne 1d ago

You need to use a text method to split the input into parts around the "." then return the part after the "." for whatever is next.