mirror of https://github.com/oxen-io/session-ios
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
470 B
Swift
19 lines
470 B
Swift
5 years ago
|
|
||
|
public extension String {
|
||
|
|
||
5 years ago
|
func removing05PrefixIfNeeded() -> String {
|
||
5 years ago
|
var result = self
|
||
|
if result.count == 66 && result.hasPrefix("05") { result.removeFirst(2) }
|
||
|
return result
|
||
|
}
|
||
|
}
|
||
4 years ago
|
|
||
|
@objc public extension NSString {
|
||
|
|
||
|
@objc func removing05PrefixIfNeeded() -> NSString {
|
||
|
var result = self as String
|
||
|
if result.count == 66 && result.hasPrefix("05") { result.removeFirst(2) }
|
||
|
return result as NSString
|
||
|
}
|
||
|
}
|