code: public static String stripPrefixIfPresent(final String key, final String prefix) {
      if (key.startsWith(prefix)) {
        return key.substring(prefix.length());
      }
      return key;
    }
docs: Strips the prefix from the key if it is present. For example, for input key
  ufs://my-bucket-name/my-key/file and prefix ufs://my-bucket-name/, the output would be
  my-key/file. This method will leave keys without a prefix unaltered, ie. my-key/file
  returns my-key/file.
  
  @param key the key to strip
  @param prefix prefix to remove
  @return the key without the prefix