mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[stdlib] Propagate BidirectionalIndexType docs
193 undocumented public non-operator APIs remain in core Swift SVN r22225
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user