We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
understimatedCap
underestimatedCap
1 parent 1374147 commit 6bfe3daCopy full SHA for 6bfe3da
stdlib/public/core/String.swift
@@ -590,10 +590,10 @@ extension Sequence where Element: StringProtocol {
590
internal func _joined(separator: String) -> String {
591
// A likely-under-estimate, but lets us skip some of the growth curve
592
// for large Sequences.
593
- let understimatedCap =
+ let underestimatedCap =
594
(1 &+ separator._guts.count) &* self.underestimatedCount
595
var result = ""
596
- result.reserveCapacity(understimatedCap)
+ result.reserveCapacity(underestimatedCap)
597
if separator.isEmpty {
598
for x in self {
599
result.append(x._ephemeralString)
0 commit comments