|Category: algorithms||Component type: function|
template <class ForwardIterator> inline ForwardIterator rotate(ForwardIterator first, ForwardIterator middle, ForwardIterator last);
char alpha = "abcdefghijklmnopqrstuvwxyz"; rotate(alpha, alpha + 13, alpha + 26); printf("%s\n", alpha); // The output is nopqrstuvwxyzabcdefghijklm
 It follows from these two requirements that [first, last) is a valid range.
 Rotate uses a different algorithm depending on whether its arguments are Forward Iterators, Bidirectional Iterators, or Random Access Iterators. All three algorithms, however, are linear.
|Copyright © 2009 - 2013 Silicon Graphics International. All rights reserved.|