The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

SYNOPSIS

    use String::CyclicRotation;
    my $res = is_rotation("table", "bleta"); #true

DESCRIPTION

Checks if a string is a cyclic rotation of another string. This test is done in O(n).

METHODS

is_rotation

Checks if a string is a cyclic rotation of another string.

More Information

You can check more information about the used algorithm in the book "Algorithms on strings, trees and sequences".

Author

Joao Carreira, <joao.carreira@ist.utl.pt>

COPYRIGHT & LICENSE

Copyright 2009 Joao Carreira, All Rights Reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.