Add draft indicator, filter drafts, show issue count
This commit is contained in:
@ -63,6 +63,15 @@ extension String {
|
||||
return components(separatedBy: separator).dropLast().joined(separator: separator)
|
||||
}
|
||||
|
||||
/**
|
||||
Remove everything before the last separator.
|
||||
|
||||
Also removes the separator itself. If the separator is not contained in the string, then the full string is returned.
|
||||
*/
|
||||
func dropBeforeLast<T>(_ separator: T) -> String where T: StringProtocol {
|
||||
components(separatedBy: separator).last!
|
||||
}
|
||||
|
||||
func dropBeforeFirst(_ separator: String) -> String {
|
||||
guard contains(separator) else {
|
||||
return self
|
||||
|
Reference in New Issue
Block a user