Acme-ZeroWidth

 view release on metacpan or  search on metacpan

lib/Acme/ZeroWidth.pm  view on Meta::CPAN

sub from_zero_width {
    my ($not_visible) = @_;

    return join '', map { pack 'B*', $_ }
      map { s/\x{200b}/1/g; s/\x{200c}/0/g; $_ } split /\x{200d}/, $not_visible;
}

1;
__END__

=encoding utf-8

=head1 NAME

Acme::ZeroWidth - Zero-width fingerprinting

=head1 SYNOPSIS

    use Acme::ZeroWidth qw(to_zero_width from_zero_width);

    to_zero_width('vti'); # becomes \x{200b}\x{200c}...



( run in 0.232 second using v1.01-cache-2.11-cpan-4d50c553e7e )