mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 20:11:17 +00:00
Fix -l and -L build options.
This commit is contained in:
@@ -93,6 +93,14 @@ const char *str_remove_suffix(const char *name, const char *suffix)
|
||||
return name_copy;
|
||||
}
|
||||
|
||||
bool str_has_suffix(const char *name, const char *suffix)
|
||||
{
|
||||
size_t name_len = strlen(name);
|
||||
size_t suffix_len = strlen(suffix);
|
||||
if (name_len <= suffix_len) return false;
|
||||
return memcmp(name + name_len - suffix_len, suffix, suffix_len) == 0;
|
||||
}
|
||||
|
||||
|
||||
StringSlice slice_next_token(StringSlice *slice, char separator)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user