Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions stdlib/public/core/UTF8SpanIterators.swift
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ extension UTF8Span {
}


/// Advance `codeUnitOffset` to the end of the current scalar, without
/// Advance `currentCodeUnitOffset` to the end of the current scalar, without
/// decoding it.
///
/// Returns the number of `Unicode.Scalar`s skipped over, which can be 0
Expand All @@ -113,7 +113,7 @@ extension UTF8Span {
return 1
}

/// Advance `codeUnitOffset` to the end of `n` scalars, without decoding
/// Advance `currentCodeUnitOffset` to the end of `n` scalars, without decoding
/// them.
///
/// Returns the number of `Unicode.Scalar`s skipped over, which can be
Expand All @@ -130,7 +130,7 @@ extension UTF8Span {
return numSkipped
}

/// Move `codeUnitOffset` to the start of the previous scalar, without
/// Move `currentCodeUnitOffset` to the start of the previous scalar, without
/// decoding it.
///
/// Returns the number of `Unicode.Scalar`s skipped over, which can be 0
Expand All @@ -149,7 +149,7 @@ extension UTF8Span {
return 1
}

/// Move `codeUnitOffset` to the start of the previous `n` scalars,
/// Move `currentCodeUnitOffset` to the start of the previous `n` scalars,
/// without decoding them.
///
/// Returns the number of `Unicode.Scalar`s skipped over, which can be
Expand Down Expand Up @@ -192,7 +192,7 @@ extension UTF8Span {
self.currentCodeUnitOffset = codeUnits._scalarAlignForwards(i)
}

// TODO: for below, verify that there is no path to UB, just garabage-data or guaranteed
// TODO: for below, verify that there is no path to UB, just garbage-data or guaranteed
// trap!

/// Reset this iterator to `codeUnitOffset`, skipping _all_ safety
Expand Down Expand Up @@ -334,7 +334,7 @@ extension UTF8Span {
return result
}

/// Advance `codeUnitOffset` to the end of the current `Character`,
/// Advance `currentCodeUnitOffset` to the end of the current `Character`,
/// without constructing it.
///
/// Returns the number of `Character`s skipped over, which can be 0
Expand All @@ -351,7 +351,7 @@ extension UTF8Span {
return 1
}

/// Advance `codeUnitOffset` to the end of `n` `Characters`, without
/// Advance `currentCodeUnitOffset` to the end of `n` `Characters`, without
/// constructing them.
///
/// Returns the number of `Character`s skipped over, which can be
Expand All @@ -366,7 +366,7 @@ extension UTF8Span {
return numSkipped
}

/// Move `codeUnitOffset` to the start of the previous `Character`,
/// Move `currentCodeUnitOffset` to the start of the previous `Character`,
/// without constructing it.
///
/// Returns the number of `Character`s skipped over, which can be 0
Expand All @@ -384,7 +384,7 @@ extension UTF8Span {

}

/// Move `codeUnitOffset` to the start of the previous `n` `Character`s,
/// Move `currentCodeUnitOffset` to the start of the previous `n` `Character`s,
/// without constructing them.
///
/// Returns the number of `Character`s skipped over, which can be
Expand Down