View source code
							
							
						
								Display the source code in std/range/package.d from which this
								page was generated on github.
							
						
							Report a bug
							
						
								If you spot a problem with this page, click here to create a
								Bugzilla issue.
							
						
							
								Improve this page
							
							
					
								Quickly fork, edit online, and submit a pull request for this page.
								Requires a signed-in GitHub account. This works well for small changes.
								If you'd like to make larger changes you may want to consider using
								local clone.
							
						Function std.range.radial
Iterates a random-access range starting from a given point and progressively extending left and right from that point. If no initial point is given, iteration starts from the middle of the range. Iteration spans the entire range.
						
				auto auto radial(Range, I)
				(
				
				  Range r,
				
				  I startingIndex
				
				)
				
				if (isRandomAccessRange!(Unqual!Range) && hasLength!(Unqual!Range) && hasSlicing!(Unqual!Range) && isIntegral!I);
				
				
				auto auto radial(R)
				(
				
				  R r
				
				)
				
				if (isRandomAccessRange!(Unqual!R) && hasLength!(Unqual!R) && hasSlicing!(Unqual!R));
						
					
				When startingIndex is 0 the range will be fully iterated in order
and in reverse order when r is given.
Parameters
| Name | Description | 
|---|---|
| r | a random access range with length and slicing | 
| startingIndex | the index to begin iteration from | 
Returns
A forward range with length
Example
import stdAuthors
Andrei Alexandrescu, David Simcha, Jonathan M Davis, and Jack Stouffer. Credit for some of the ideas in building this module goes to Leonardo Maffi.
License
					Copyright © 1999-2022 by the D Language Foundation | Page generated by ddox.