Imagine that I have two strings, one of them is a url like \"/sdcard/test.avi\" and the other one is\"/sdcard/test.mkv\". I want to write an if statement that looks whether
Just perform if ( strcmp(str1+strlen(str1)-4, str2+strlen(str2)-4) == 0 ) {}.
if ( strcmp(str1+strlen(str1)-4, str2+strlen(str2)-4) == 0 ) {}
Make sure both strings are at least 4 characters long.