Add more file properties, organize storage, add video block
This commit is contained in:
@ -95,8 +95,10 @@ extension String {
|
||||
|
||||
/**
|
||||
Split the string at the first occurence of the separator
|
||||
|
||||
If the String does not contain the separator, then `before` will contain the whole string, and `after` will be empty
|
||||
*/
|
||||
func splitAtFirst(_ separator: String) -> (String, String) {
|
||||
func splitAtFirst(_ separator: String) -> (before: String, after: String) {
|
||||
let parts = components(separatedBy: separator)
|
||||
return (parts.first!, parts.dropFirst().joined(separator: separator))
|
||||
}
|
||||
|
Reference in New Issue
Block a user