Use | operator to concatenate multiline strings
This commit is contained in:
parent
2fdd3fd6ec
commit
08c91599b6
5 changed files with 6 additions and 6 deletions
|
|
@ -23,7 +23,7 @@ public extension String {
|
|||
}
|
||||
|
||||
extension String {
|
||||
static func | (left: String, right: String) -> String {
|
||||
public static func | (left: String, right: String) -> String {
|
||||
return right.isEmpty ? left : left + "\n" + right
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue