mirror of https://github.com/oxen-io/session-ios
				
				
				
			
			You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
	
	
		
			12 lines
		
	
	
		
			317 B
		
	
	
	
		
			Swift
		
	
		
		
			
		
	
	
			12 lines
		
	
	
		
			317 B
		
	
	
	
		
			Swift
		
	
| 
								 
											8 years ago
										 
									 | 
							
								//
							 | 
						||
| 
								 | 
							
								//  Copyright (c) 2018 Open Whisper Systems. All rights reserved.
							 | 
						||
| 
								 | 
							
								//
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								public extension Collection {
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    /// Returns the element at the specified index iff it is within bounds, otherwise nil.
							 | 
						||
| 
								 | 
							
								    public subscript (safe index: Index) -> Element? {
							 | 
						||
| 
								 | 
							
								        return indices.contains(index) ? self[index] : nil
							 | 
						||
| 
								 | 
							
								    }
							 | 
						||
| 
								 | 
							
								}
							 |