mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 18:38:55 +00:00
trim correctly (#8388)
Co-authored-by: dave caruso <me@paperdave.net> Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
This commit is contained in:
@@ -698,6 +698,10 @@ pub fn withoutLeadingSlash(this: string) []const u8 {
|
||||
return std.mem.trimLeft(u8, this, "/");
|
||||
}
|
||||
|
||||
pub fn withoutLeadingPathSeparator(this: string) []const u8 {
|
||||
return std.mem.trimLeft(u8, this, &.{std.fs.path.sep});
|
||||
}
|
||||
|
||||
pub fn endsWithAny(self: string, str: string) bool {
|
||||
const end = self[self.len - 1];
|
||||
for (str) |char| {
|
||||
|
||||
Reference in New Issue
Block a user