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 756579b commit 0f6d00dCopy full SHA for 0f6d00d
Sources/SWBUtil/Path.swift
@@ -97,7 +97,7 @@ public struct Path: Serializable, Sendable {
97
}
98
@inline(__always) public static func firstPathSeparatorIndex(in str: some StringProtocol, separators: (some Collection<Character>)?) -> String.Index? {
99
guard let separators else {
100
- return str.utf8.index(of: pathSeparatorUTF8)
+ return str.utf8.firstIndex(of: pathSeparatorUTF8)
101
102
return str.firstIndex(where: { separators.contains($0) })
103
0 commit comments