fix(window): some more bin things (#8612)

* allow linking bins that do not exist.

* fix some things
This commit is contained in:
dave caruso
2024-01-31 22:37:03 -08:00
committed by GitHub
parent 42e4cd8408
commit 91cfd614ca
5 changed files with 88 additions and 64 deletions

View File

@@ -5948,3 +5948,10 @@ pub inline fn indexOfScalar(input: anytype, scalar: std.meta.Child(@TypeOf(input
pub fn containsScalar(input: anytype, item: std.meta.Child(@TypeOf(input))) bool {
return indexOfScalar(input, item) != null;
}
pub fn withoutSuffixComptime(input: []const u8, comptime suffix: []const u8) []const u8 {
if (hasSuffixComptime(input, suffix)) {
return input[0 .. input.len - suffix.len];
}
return input;
}