package MDK::Common::String; =head1 NAME MDK::Common::String - formatting functions =head1 SYNOPSIS use MDK::Common::String qw(:all); =head1 EXPORTS =over =item bestMatchSentence(STRING, LIST) finds in the list the best corresponding string =item formatList(INT, LIST) if the list size is bigger than INT, replace the remaining elements with "...". formatList(3, qw(a b c d e)) # => "a, b, c, ..." =item formatError(STRING) the string is something like "error at foo.pl line 2" that you get when catching an exception. formatError will remove the "at ..." so that you can nicely display the returned string to the user =item formatTimeRaw(TIME) the TIME is an epoch as returned by C