We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d39e8a4 commit 089d9a1Copy full SHA for 089d9a1
Sources/SWBUtil/Path.swift
@@ -80,7 +80,7 @@ public struct Path: Serializable, Sendable {
80
}
81
@inline(__always) public static func firstPathSeparatorIndex(in str: some StringProtocol, separators: (some Collection<Character>)?) -> String.Index? {
82
guard let separators else {
83
- return str.utf8.firstIndex(where: Path.isUTF8PathSeparator)
+ return str.utf8.firstIndex(where: { Path.isUTF8PathSeparator($0, separators) })
84
85
return str.firstIndex(where: { separators.contains($0) })
86
0 commit comments