All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.vertx.codetrans.Helper Maven / Gradle / Ivy

package io.vertx.codetrans;

import java.util.ArrayList;
import java.util.List;

/**
 * @author Julien Viet
 */
public class Helper {

  static String unwrapQuotedString(String s) {
    int len = s.length();
    if (len > 2 && s.charAt(0) == '"' && s.charAt(len - 1) == '"') {
      return s.substring(1, len - 1);
    } else {
      throw new IllegalArgumentException("Illegal quoted string " + s);
    }
  }

  static  List append(List list, E last) {
    ArrayList copy = new ArrayList<>(list);
    copy.add(last);
    return copy;
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy