Instance Methodswift-algorithms 1.2.1Algorithms
index(_:offsetBy:limitedBy:)
Chunked.swift:659func index(_ i: Index, offsetBy offset: Int, limitedBy limit: Index) -> Index?
func index(_ i: Index, offsetBy offset: Int, limitedBy limit: Index) -> Index?
s10Algorithms23ChunksOfCountCollectionV5index_8offsetBy07limitedH0AC5IndexVyx_GSgAI_SiAItF
What are these?7CN82
where Base:Collection
import Algorithms
Swift Algorithms is an open-source package of sequence and collection algorithms, along with their related types.
struct ChunksOfCountCollection<Base> where Base : Collection
A collection that presents the elements of its base collection in SubSequence
chunks of any given count.
struct Index
@frozen struct Int
A signed integer value type.
protocol Collection<Element> : Sequence
A sequence whose elements can be traversed multiple times, nondestructively, and accessed by an indexed subscript.
var count: Int { get }
var endIndex: Index { get }
var startIndex: Index { get }
subscript(i: Index) -> Element { get }
func distance(from start: Index, to end: Index) -> Int
func index(_ i: Index, offsetBy distance: Int) -> Index
func index(after i: Index) -> Index