Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我已经将一些东西传递给了这些变量:
char *filename; int filename_len;
如何检查是否filename以“.abc”结尾?
filename
if (filename_len >= 4 && strcmp(filename + filename_len - 4, ".abc") == 0) { // match }