# NOTE: Derived from lib/Term/ReadLine/Zoid/ViCommand.pm. # Changes made here will be lost when autosplit is run again. # See AutoSplit.pm. package Term::ReadLine::Zoid::ViCommand; #line 348 "lib/Term/ReadLine/Zoid/ViCommand.pm (autosplit into blib/lib/auto/Term/ReadLine/Zoid/ViCommand/vi_case.al)" sub vi_case { # reverse case my ($self, undef, $cnt) = @_; my $str = substr $$self{lines}[ $$self{pos}[1] ], $$self{pos}[0], $cnt, ''; $str =~ s/(([[:lower:]]+)|[[:upper:]]+)/$2 ? uc($1) : lc($1)/eg; substr $$self{lines}[ $$self{pos}[1] ], $$self{pos}[0], 0, $str; $$self{pos}[0] += length $str; } # end of Term::ReadLine::Zoid::ViCommand::vi_case 1;