This commit is contained in:
Dmitri Gribenko
2016-03-06 02:12:59 -08:00
parent ad1428e1d6
commit fc636b94f5
7 changed files with 19 additions and 15 deletions

View File

@@ -283,7 +283,8 @@ extension String.UnicodeScalarView : RangeReplaceableCollection {
>(
bounds: Range<Index>, with newElements: C
) {
let rawSubRange = bounds.startIndex._position
let rawSubRange: Range<Int> =
bounds.startIndex._position
..< bounds.endIndex._position
let lazyUTF16 = newElements.lazy.flatMap { $0.utf16 }
_core.replaceSubrange(rawSubRange, with: lazyUTF16)