findCommonSubpath(stringArrays) {
    if (!stringArrays || stringArrays.length === 0) {
      return '';
    }
    let cleanStringArrays = [],
      res = [];
    stringArrays.forEach((cString) => {
      if (cString) {
        cleanStringArrays.push(cString.split('/'));
      }
    });
    const asc = cleanStringArrays.sort((a, b) => { return a.length - b.length; });
    for (let segmentIndex = 0; segmentIndex < asc[0].length; segmentIndex++) {
      const segment = asc[0][segmentIndex];
      let nonCompliant = asc.find((cString) => {
        return cString[segmentIndex] !== segment;
      });
      if (nonCompliant) {
        break;
      }
      res.push(segment);
    }
    return res.join('/');
  }
Finds the common subpath from an array of strings starting from the
strings starts
@param {Array} stringArrays - pointer to get the name from
@returns {string} - string: the common substring