From d5a20581b078afc03d9f574a08d9cf8d4f5df20e Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Mon, 20 Aug 2007 14:28:19 +0000 Subject: [PATCH] INTEGRATION: CWS native99 (1.3.738); FILE MERGED 2007/08/07 13:57:54 is 1.3.738.1: #i80411# new scp linker to simplify package restructuring --- solenv/bin/modules/par2script/converter.pm | 28 ++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/solenv/bin/modules/par2script/converter.pm b/solenv/bin/modules/par2script/converter.pm index 6c71ceb718f0..2cbe49136ec5 100644 --- a/solenv/bin/modules/par2script/converter.pm +++ b/solenv/bin/modules/par2script/converter.pm @@ -4,9 +4,9 @@ # # $RCSfile: converter.pm,v $ # -# $Revision: 1.3 $ +# $Revision: 1.4 $ # -# last change: $Author: rt $ $Date: 2005-09-08 09:25:06 $ +# last change: $Author: ihi $ $Date: 2007-08-20 15:28:19 $ # # The Contents of this file are made available subject to # the terms of GNU Lesser General Public License Version 2.1. @@ -82,6 +82,30 @@ sub convert_hash_into_array return \@array } +sub convert_stringlist_into_array_2 +{ + my ( $input, $separator ) = @_; + + my @newarray = (); + my $first = ""; + my $last = ""; + + $last = $input; + + while ( $last =~ /^\s*(.+?)\s*\Q$separator\E\s*(.+)\s*$/) # "$" for minimal matching + { + $first = $1; + $last = $2; + par2script::remover::remove_leading_and_ending_whitespaces(\$first); + if ( $first ) { push(@newarray, $first); } + } + + par2script::remover::remove_leading_and_ending_whitespaces(\$last); + if ( $last ) { push(@newarray, $last); } + + return \@newarray; +} + sub convert_stringlist_into_array { my ( $includestringref, $separator ) = @_;