mirror of
https://github.com/oven-sh/bun
synced 2026-02-10 19:08:50 +00:00
Make it yellow
This commit is contained in:
@@ -652,6 +652,10 @@ pub fn hasPrefixComptime(self: string, comptime alt: anytype) bool {
|
||||
return self.len >= alt.len and eqlComptimeCheckLenWithType(u8, self[0..alt.len], alt, false);
|
||||
}
|
||||
|
||||
/// Check if two strings are equal with one of the strings being a comptime-known value
|
||||
///
|
||||
/// strings.eqlComptime(input, "hello world");
|
||||
/// strings.eqlComptime(input, "hai");
|
||||
pub inline fn eqlComptimeCheckLenWithType(comptime Type: type, a: []const Type, comptime b: anytype, comptime check_len: bool) bool {
|
||||
@setEvalBranchQuota(9999);
|
||||
if (comptime check_len) {
|
||||
|
||||
Reference in New Issue
Block a user