[csw-devel] SF.net SVN: gar:[17289] csw/mgar/gar/v2/lib/python/sharedlib_utils.py
wahwah at users.sourceforge.net
wahwah at users.sourceforge.net
Sun Mar 4 13:30:56 CET 2012
Revision: 17289
http://gar.svn.sourceforge.net/gar/?rev=17289&view=rev
Author: wahwah
Date: 2012-03-04 12:30:56 +0000 (Sun, 04 Mar 2012)
Log Message:
-----------
pkgdb: Adding back a collection substring getter
It's used in another function.
Modified Paths:
--------------
csw/mgar/gar/v2/lib/python/sharedlib_utils.py
Modified: csw/mgar/gar/v2/lib/python/sharedlib_utils.py
===================================================================
--- csw/mgar/gar/v2/lib/python/sharedlib_utils.py 2012-03-04 12:30:27 UTC (rev 17288)
+++ csw/mgar/gar/v2/lib/python/sharedlib_utils.py 2012-03-04 12:30:56 UTC (rev 17289)
@@ -230,3 +230,13 @@
"""Needs to be improved to escape more characters."""
s = s.replace(r'.', r'\.')
return s
+
+
+def CollectionLongestCommonSubstring(collection):
+ current_substring = collection.pop()
+ while collection and current_substring:
+ substring_set = LongestCommonSubstring(current_substring,
+ collection.pop())
+ if substring_set:
+ current_substring = list(substring_set)[0]
+ return current_substring
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the devel
mailing list