Introduce string extension property 'trimmed'

This commit is contained in:
Danny Moesch 2018-11-13 23:53:08 +01:00 committed by Bob Sun
parent 8573c66da2
commit b6f94f8814
5 changed files with 18 additions and 3 deletions

View file

@ -64,7 +64,7 @@ class Parser {
result.append(Constants.getSeparator(breakingLines: !removingLineBreaks))
i += 1
}
return result.trimmingCharacters(in: .whitespacesAndNewlines)
return result.trimmed
}
/// Split line from password file in to a key-value pair separted by `: `.