Introduce string extension property 'trimmed'
This commit is contained in:
parent
8573c66da2
commit
b6f94f8814
5 changed files with 18 additions and 3 deletions
|
|
@ -38,7 +38,7 @@ class CommitLogsTableViewController: UITableViewController {
|
|||
let messageLabel = cell.contentView.viewWithTag(202) as? UILabel
|
||||
author?.text = commits[indexPath.row].author?.name
|
||||
dateLabel?.text = dateString
|
||||
messageLabel?.text = commits[indexPath.row].message?.trimmingCharacters(in: .whitespacesAndNewlines)
|
||||
messageLabel?.text = commits[indexPath.row].message?.trimmed
|
||||
return cell
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -230,7 +230,7 @@ class PasswordEditorTableViewController: UITableViewController, FillPasswordTabl
|
|||
func insertScannedOTPFields(_ otpauth: String) {
|
||||
// update tableData
|
||||
var additionsString = ""
|
||||
if let additionsPlainText = (tableData[additionsSection][0][PasswordEditorCellKey.content] as? String)?.trimmingCharacters(in: .whitespacesAndNewlines), additionsPlainText != "" {
|
||||
if let additionsPlainText = (tableData[additionsSection][0][PasswordEditorCellKey.content] as? String)?.trimmed, additionsPlainText != "" {
|
||||
additionsString = additionsPlainText + "\n" + otpauth
|
||||
} else {
|
||||
additionsString = otpauth
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue