View source code
							
							
						
								Display the source code in std/algorithm/mutation.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.mutation.swapRanges
Swaps all elements of r1 with successive elements in r2.
Returns a tuple containing the remainder portions of r1 and r2 that were not swapped (one of them will be empty). The ranges may
be of different types but must have the same element type and support
swapping.
						
				Tuple!(InputRange1,InputRange2) swapRanges(InputRange1, InputRange2)
				(
				
				  InputRange1 r1,
				
				  InputRange2 r2
				
				)
				
				if (hasSwappableElements!InputRange1 && hasSwappableElements!InputRange2 && is(ElementType!InputRange1 == ElementType!InputRange2));
						
					
				Parameters
| Name | Description | 
|---|---|
| r1 | an input range with swappable elements | 
| r2 | an input range with swappable elements | 
Returns
Tuple containing the remainder portions of r1 and r2 that were not swapped
Example
import stdAuthors
License
					Copyright © 1999-2018 by the D Language Foundation | Page generated by ddox.