Name : perl-String-Diff
| |
Version : 0.70.0
| Vendor : obs://build_opensuse_org/devel:languages:perl
|
Release : 150600.2.1
| Date : 2024-07-29 21:46:35
|
Group : Unspecified
| Source RPM : perl-String-Diff-0.70.0-150600.2.1.src.rpm
|
Size : 0.04 MB
| |
Packager : https://www_suse_com/
| |
Summary : Simple diff to String
|
Description :
String::Diff is the difference of a consecutive string is made. after general diff is done, the difference in the line is searchable.
the mark of the addition and the deletion can be freely changed. the color is colored to the terminal with ANSI, using the HTML display it.
after the line is divided, diff is taken when \'linebreak\' option is specified.
my($old_string, $new_string) = String::Diff::diff_fully(\'this is Perl\', \'this is Ruby\', linebreak => 1); my($old_string, $new_string) = String::Diff::diff(\'this is Perl\', \'this is Ruby\', linebreak => 1); my $string = String::Diff::diff_merge(\'this is Perl\', \'this is Ruby\', linebreak => 1); my $string = String::Diff::diff_regexp(\'this is Perl\', \'this is Ruby\', linebreak => 1);
In diff and diff_merge methods the mark of the difference can be changed.
my $diff = String::Diff::diff(\'this is Perl\', \'this is Ruby\', remove_open => \'< del>\', remove_close => \'< /del>\', append_open => \'< ins>\', append_close => \'< /ins>\', );
You can escape callback set to diff function and diff_merge function.
use HTML::Entities my($diff_old, $diff_new) = String::Diff::diff( \'this is < b>Perl< /b>\', \'this is < b>< BIG>R< /BIG>uby< /b>\', remove_open => \'< del>\', remove_close => \'< /del>\', append_open => \'< ins>\', append_close => \'< /ins>\', escape => sub { encode_entities($_[0]) }, }); is($diff_old, \'this is <b>< del>Perl< /del></b>\'); is($diff_new, \'this is <b>< ins><BIG>R</BIG>uby< /ins></b>\');
|
RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/devel:/languages:/perl/SLE_15_SP6/noarch |