Instance Methodswift 6.0.1Swift
index(_:offsetBy:limitedBy:)
func index(_ i: String.UnicodeScalarView.Index, offsetBy distance: Int, limitedBy limit: String.UnicodeScalarView.Index) -> String.UnicodeScalarView.Index?
Other members in extension
Types
Typealiases
Type members
init(
) Creates an empty view instance.
Instance members
var customMirror: Mirror
Returns a mirror that reflects the Unicode scalars view of a string.
var debugDescription: String
var description: String
var endIndex: String.UnicodeScalarView.Index
The “past the end” position—that is, the position one greater than the last valid subscript argument.
var startIndex: String.UnicodeScalarView.Index
The position of the first Unicode scalar value if the string is nonempty.
subscript(Range<String.UnicodeScalarView.Index>
) -> String.UnicodeScalarView.SubSequence subscript(String.UnicodeScalarView.Index
) -> Unicode.Scalar Accesses the Unicode scalar value at the given position.
func append(Unicode.Scalar
) Appends the given Unicode scalar to the view.
func append<S>(contentsOf: S
) Appends the Unicode scalar values in the given sequence to the view.
func distance(from: String.UnicodeScalarView.Index, to: String.UnicodeScalarView.Index
) -> Int func index(String.UnicodeScalarView.Index, offsetBy: Int
) -> String.UnicodeScalarView.Index func index(after: String.UnicodeScalarView.Index
) -> String.UnicodeScalarView.Index Returns the next consecutive location after
i
.func index(before: String.UnicodeScalarView.Index
) -> String.UnicodeScalarView.Index Returns the previous consecutive location before
i
.func makeIterator(
) -> String.UnicodeScalarView.Iterator func replaceSubrange<C>(Range<String.UnicodeScalarView.Index>, with: C
) Replaces the elements within the specified bounds with the given Unicode scalar values.
func reserveCapacity(Int
) Reserves enough space in the view’s underlying storage to store the specified number of ASCII characters.