docs: public static String substringBeforeLast(final String str, final String separator) {
          if (isEmpty(str) || isEmpty(separator)) {
              return str;
          }
          final int pos = str.lastIndexOf(separator);
          if (pos == INDEX_NOT_FOUND) {
              return str;
          }
          return str.substring(0, pos);
      }