[Bio] / Sprout / SearchHelper.pm Repository:
ViewVC logotype

Diff of /Sprout/SearchHelper.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.47, Mon Mar 16 00:23:37 2009 UTC revision 1.48, Thu Apr 2 01:45:05 2009 UTC
# Line 2176  Line 2176 
2176      return $retVal;      return $retVal;
2177  }  }
2178    
2179    =head3 ParseIDList
2180    
2181        my @idList = $sh->ParseIDList($string);
2182    
2183    Compute the list of IDs found in the specified string. In the string, any
2184    comma, quote, or white space character is considered a delimiter.
2185    Everything else is considered an ID.
2186    
2187    =over 4
2188    
2189    =item string
2190    
2191    Input string containing the IDs.
2192    
2193    =item RETURN
2194    
2195    Returns a list of the IDs found.
2196    
2197    =back
2198    
2199    =cut
2200    
2201    sub ParseIDList {
2202        # Get the parameters.
2203        my ($self, $string) = @_;
2204        # Declare the return variable.
2205        my $retVal;
2206        # Get a safety copy of the string.
2207        my $line = $string;
2208        # Convert all delimiter sequences to spaces.
2209        $line =~ s/[\s"',]+/ /gs;
2210        # Split the result and remove empty entries.
2211        my @retVal = grep { $_ } split / /, $line;
2212        # Return the result.
2213        return @retVal;
2214    }
2215    
2216    
2217    
2218    
2219  =head3 GetPreferredAliasType  =head3 GetPreferredAliasType
2220    
2221      my $type = $shelp->GetPreferredAliasType();      my $type = $shelp->GetPreferredAliasType();

Legend:
Removed from v.1.47  
changed lines
  Added in v.1.48

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3