Build Status

NAME

String::Incremental - incremental string with your rule

SYNOPSIS

use String::Incremental;

my $str = String::Incremental->new(
    format => 'foo-%2=-%=',
    orders => [
        [0..2],
        'abcd',
    ],
);

# or

use String::Incremental qw( incremental_string );

my $str = incremental_string(
    'foo-%2=-%=',
    [0..2],
    'abcd',
);

print "$str";  # prints 'foo-00-a'

$str++; $str++; $str++;
print "$str";  # prints 'foo-00-d'

$str++;
print "$str";  # prints 'foo-01-a'

$str->set( 'foo-22-d' );
print "$str";  # prints 'foo-22-d';
$str++;  # dies, cannot ++ any more

DESCRIPTION

String::Incremental provides generating string that can increment in accordance with your format and rule.

CONSTRUCTORS

METHODS

FUNCTIONS

LICENSE

Copyright (C) issm.

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

AUTHOR

issm issmxx@gmail.com