View source code
							
							
						
								Display the source code in std/algorithm/iteration.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.algorithm.iteration.joiner
Lazily joins a range of ranges with a separator. The separator itself
is a range. If a separator is not provided, then the ranges are
joined directly without anything in between them (often called flatten
in other languages).
						
				auto auto joiner(RoR, Separator)
				(
				
				  RoR r,
				
				  Separator sep
				
				)
				
				if (isInputRange!RoR && isInputRange!(ElementType!RoR) && isForwardRange!Separator && is(ElementType!Separator : ElementType!(ElementType!RoR)));
				
				
				auto auto joiner(RoR)
				(
				
				  RoR r
				
				)
				
				if (isInputRange!RoR && isInputRange!(ElementType!RoR));
						
					
				Parameters
| Name | Description | 
|---|---|
| r | An input range of input ranges to be joined. | 
| sep | A forward range of element(s) to serve as separators in the joined range. | 
Returns
A range of elements in the joined range. This will be a forward range if
both outer and inner ranges of RoR are forward ranges; otherwise it will
be only an input range. The
range bidirectionality
is propagated if no separator is specified.
See also
std, which chains a sequence of ranges with compatible elements
into a single range.
Example
import stdExample
import stdExample
joiner allows in-place mutation!
import stdExample
insert characters fully lazily into a string
import stdExample
joiner can be bidirectional
import stdAuthors
License
					Copyright © 1999-2022 by the D Language Foundation | Page generated by ddox.