Skip to content

Commit

Permalink
added utility function crlf2lf()
Browse files Browse the repository at this point in the history
  • Loading branch information
Craftworks committed Aug 18, 2014
1 parent 2dd4045 commit e4a0499
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/Kurious/Util.pm
Expand Up @@ -3,7 +3,14 @@ package Kurious::Util;
use Mojo::Base -strict;
use Exporter::Lite;

our @EXPORT = qw(rows2kv rows2krows);
our @EXPORT = qw(crlf2lf rows2kv rows2krows);

sub crlf2lf {
local $_ = shift;
s/\x0D\x0A/\n/go;
tr/\x0D\x0A/\n\n/;
return $_;
}

sub rows2kv {
my ($rows, $key) = @_;
Expand Down

0 comments on commit e4a0499

Please sign in to comment.