Merge pull request #477 from swiftix/SE-130
Minor changes due to SE-0130: Replace String.init(repeating: Character, count: Int) by String.init(repeating: Sttring, count: Int)
diff --git a/Foundation/NSDictionary.swift b/Foundation/NSDictionary.swift
index e1e948b..ec59320 100644
--- a/Foundation/NSDictionary.swift
+++ b/Foundation/NSDictionary.swift
@@ -354,11 +354,11 @@
if level > 100 { return "..." }
var lines = [String]()
- let indentation = String(repeating: Character(" "), count: level * 4)
+ let indentation = String(repeating: " ", count: level * 4)
lines.append(indentation + "{")
for key in self.allKeys {
- var line = String(repeating: Character(" "), count: (level + 1) * 4)
+ var line = String(repeating: " ", count: (level + 1) * 4)
if key is NSArray {
line += (key as! NSArray).description(withLocale: locale, indent: level + 1)
diff --git a/Tools/plutil/main.swift b/Tools/plutil/main.swift
index 7cd2067..cea6466 100644
--- a/Tools/plutil/main.swift
+++ b/Tools/plutil/main.swift
@@ -201,7 +201,7 @@
extension Dictionary {
func display(_ indent: Int = 0, type: DisplayType = .Primary) {
- let indentation = String(repeating: Character(" "), count: indent * 2)
+ let indentation = String(repeating: " ", count: indent * 2)
if type == .Primary || type == .Key {
print("\(indentation)[\n", terminator: "")
} else {
@@ -224,7 +224,7 @@
extension Array {
func display(_ indent: Int = 0, type: DisplayType = .Primary) {
- let indentation = String(repeating: Character(" "), count: indent * 2)
+ let indentation = String(repeating: " ", count: indent * 2)
if type == .Primary || type == .Key {
print("\(indentation)[\n", terminator: "")
} else {
@@ -242,7 +242,7 @@
extension String {
func display(_ indent: Int = 0, type: DisplayType = .Primary) {
- let indentation = String(repeating: Character(" "), count: indent * 2)
+ let indentation = String(repeating: " ", count: indent * 2)
if type == .Primary {
print("\(indentation)\"\(self)\"\n", terminator: "")
}
@@ -256,7 +256,7 @@
extension Bool {
func display(_ indent: Int = 0, type: DisplayType = .Primary) {
- let indentation = String(repeating: Character(" "), count: indent * 2)
+ let indentation = String(repeating: " ", count: indent * 2)
if type == .Primary {
print("\(indentation)\"\(self ? "1" : "0")\"\n", terminator: "")
}
@@ -270,7 +270,7 @@
extension NSNumber {
func display(_ indent: Int = 0, type: DisplayType = .Primary) {
- let indentation = String(repeating: Character(" "), count: indent * 2)
+ let indentation = String(repeating: " ", count: indent * 2)
if type == .Primary {
print("\(indentation)\"\(self)\"\n", terminator: "")
}
@@ -284,7 +284,7 @@
extension NSData {
func display(_ indent: Int = 0, type: DisplayType = .Primary) {
- let indentation = String(repeating: Character(" "), count: indent * 2)
+ let indentation = String(repeating: " ", count: indent * 2)
if type == .Primary {
print("\(indentation)\"\(self)\"\n", terminator: "")
}