another.im-ios/ConversationsClassic/Helpers/String+Extensions.swift

16 lines
428 B
Swift
Raw Normal View History

2024-06-19 15:15:27 +00:00
import Foundation
extension String {
var firstLetter: String {
String(prefix(1)).uppercased()
}
2024-06-27 11:39:41 +00:00
var makeReply: String {
let allLines = components(separatedBy: .newlines)
let nonBlankLines = allLines.filter { !$0.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty }
var result = nonBlankLines.joined(separator: "\n")
result = "> \(result)"
return result
}
2024-06-19 15:15:27 +00:00
}