Add port of extSplit function