String Concat In Loop (ARCH9070)
Esta página aún no está disponible en tu idioma.
Key swift.performance.string-concat-in-loop · Severity info · Category performance
Flags += string accumulation inside a loop.
Incorrect
Section titled “Incorrect”var out = ""for p in parts { out += p }Correct
Section titled “Correct”let out = parts.joined()Use joined(), or reserveCapacity before appending.