*te = '\0';
return t;
}
+
+int rpmFileHasSuffix(const char *path, const char *suffix)
+{
+ size_t plen = strlen(path);
+ size_t slen = strlen(suffix);
+ return (plen >= slen &&
+ strcmp(path+plen-slen, suffix) == 0);
+}
*/
char * rpmEscapeSpaces(const char * s);
+/**
+ * Check if path (string) ends with given suffix
+ * @param path (path) string
+ * @param suffix suffix string to check for
+ * @return 1 if true, 0 otherwise
+ */
+int rpmFileHasSuffix(const char *path, const char *suffix);
+
#endif /* _RPMFILEUTIL_H */