How can I check whether a string ends with .csv in C?

I've tried using strlen without any success.

Edit
Report