Skip to content

krzyzanowskim/CollectionSafeIndex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CollectionSafeIndex

Return the element at the specified index only if it is within bounds, otherwise nil.

let arr = [0,1,2]
let maybe = arr[safe: 3] // nil

About

Get the element at the specified index only if it is within bounds, otherwise nil

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published

Languages