String::CyclicRotation - Checks if a string is a cyclic rotation of another string.
use String::CyclicRotation qw(is_rotation); my $res = is_rotation("table", "ablet"); #true
Checks if a string is a cyclic rotation of another string. This test is done in O(n).
Checks if a string is a cyclic rotation of another string.
You can check more information about the used algorithm in the book "Algorithms on strings, trees and sequences".
João Carreira, <joao.carreira@ist.utl.pt>
<joao.carreira@ist.utl.pt>
Copyright 2009 João Carreira, All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install String::CyclicRotation, copy and paste the appropriate command in to your terminal.
cpanm
cpanm String::CyclicRotation
CPAN shell
perl -MCPAN -e shell install String::CyclicRotation
For more information on module installation, please visit the detailed CPAN module installation guide.