Fix substring depreciated warnings
This commit is contained in:
parent
774f05eae0
commit
f646762f4b
3 changed files with 4 additions and 4 deletions
|
|
@ -14,7 +14,7 @@ extension PasswordEntity {
|
|||
public var nameWithCategory: String {
|
||||
get {
|
||||
if let p = path, p.hasSuffix(".gpg") {
|
||||
return p.substring(to: p.index(p.endIndex, offsetBy: -4))
|
||||
return String(p.prefix(upTo: p.index(p.endIndex, offsetBy: -4)))
|
||||
} else {
|
||||
return ""
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue