mirror of
https://github.com/oven-sh/bun
synced 2026-02-11 11:29:02 +00:00
feat: load sourcemaps at runtime when using a bun build --target=bun bundle (#10998)
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
This commit is contained in:
@@ -312,6 +312,11 @@ pub inline fn indexOf(self: string, str: string) ?usize {
|
||||
return @as(usize, @intCast(i));
|
||||
}
|
||||
|
||||
pub fn indexOfT(comptime T: type, haystack: []const T, needle: []const T) ?usize {
|
||||
if (T == u8) return indexOf(haystack, needle);
|
||||
return std.mem.indexOf(T, haystack, needle);
|
||||
}
|
||||
|
||||
pub fn split(self: string, delimiter: string) SplitIterator {
|
||||
return SplitIterator{
|
||||
.buffer = self,
|
||||
|
||||
Reference in New Issue
Block a user