string-util: move version_is_valid() into generic code
While we are at it, replace the sloppy use of filename_is_valid() by the less sloppy filename_part_is_valid() (as added by the preceeding commit), since we don#t want to be too restrictive here. (After all, version strings invalid as standalone filenames might be valid as part of filenames, and hence we should allow them).
This commit is contained in:
@@ -275,3 +275,5 @@ char *startswith_strv(const char *string, char **strv);
|
||||
|
||||
#define STARTSWITH_SET(p, ...) \
|
||||
startswith_strv(p, STRV_MAKE(__VA_ARGS__))
|
||||
|
||||
bool version_is_valid(const char *s);
|
||||
|
||||
Reference in New Issue
Block a user