[Python-Dev] String method: longest common prefix of two strings

Neal Norwitz neal@metaslash.com
Sun, 19 Jan 2003 10:02:23 -0500


On Sun, Jan 19, 2003 at 12:20:03PM +0100, kent@lysator.liu.se wrote:
> I'd like to get some feedback on a new string method which might
> be useful: getting the longest common prefix of two strings.

os.path.commonprefix(sequence_of_strings) does this.

Neal