[stdlib] Propagate BidirectionalIndexType docs

193 undocumented public non-operator APIs remain in core

Swift SVN r22225
This commit is contained in:
Dave Abrahams
2014-09-23 19:35:31 +00:00
parent 9623c52879
commit 218d25eb5a
8 changed files with 24 additions and 3 deletions

View File

@@ -61,6 +61,9 @@ extension String {
return Index(_position + length, _core)
}
/// Returns the previous consecutive value before `self`.
///
/// Requires: the previous value is representable.
public func predecessor() -> Index {
var i = _position
let codeUnit = _core[--i]