io.fabric8.utils.Strings.stripPrefix()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(2.7k)|赞(0)|评价(0)|浏览(141)

本文整理了Java中io.fabric8.utils.Strings.stripPrefix()方法的一些代码示例,展示了Strings.stripPrefix()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Strings.stripPrefix()方法的具体详情如下:
包路径:io.fabric8.utils.Strings
类名称:Strings
方法名:stripPrefix

Strings.stripPrefix介绍

暂无

代码示例

代码示例来源:origin: io.jenkins.updatebot/updatebot-core

protected static String stripSlashesAndGit(String path) {
  path = Strings.stripPrefix(path, "/");
  path = Strings.stripPrefix(path, "/");
  path = Strings.stripSuffix(path, "/");
  path = Strings.stripSuffix(path, ".git");
  return path;
}

代码示例来源:origin: io.fabric8.updatebot/updatebot-core

protected static String stripSlashesAndGit(String path) {
  path = Strings.stripPrefix(path, "/");
  path = Strings.stripPrefix(path, "/");
  path = Strings.stripSuffix(path, "/");
  path = Strings.stripSuffix(path, ".git");
  return path;
}

代码示例来源:origin: io.jenkins.updatebot/updatebot-core

String path = Strings.stripPrefix(gitUrl, prefix);
path = stripSlashesAndGit(path);
String[] paths = path.split(":|/", 3);

代码示例来源:origin: io.fabric8.updatebot/updatebot-core

String path = Strings.stripPrefix(gitUrl, prefix);
path = stripSlashesAndGit(path);
String[] paths = path.split(":|/", 3);

代码示例来源:origin: io.fabric8.forge/devops

try {
  String relativePath = Files.getRelativePath(dir, file);
  String value = Strings.stripPrefix(relativePath, "/");
  String label = value;
  String postfix = "/" + JENKINSFILE;

代码示例来源:origin: io.fabric8/fabric8-arquillian

public static Route createRouteForService(String routeDomainPostfix, String namespace, Service service, Logger log) {
  Route route = null;
  String id = KubernetesHelper.getName(service);
  if (Strings.isNotBlank(id) && shouldCreateRouteForService(log, service, id)) {
    route = new Route();
    String routeId = id;
    KubernetesHelper.setName(route, namespace, routeId);
    RouteSpec routeSpec = new RouteSpec();
    RouteTargetReference objectRef = new RouteTargetReferenceBuilder().withName(id).build();
    //objectRef.setNamespace(namespace);
    routeSpec.setTo(objectRef);
    if (Strings.isNotBlank(routeDomainPostfix)) {
      // Let Openshift determine the route host when the domain is not set
      String host = Strings.stripSuffix(Strings.stripSuffix(id, "-service"), ".");
      String namespaceSuffix = "-" + namespace;
      routeSpec.setHost(host + namespaceSuffix + "." + Strings.stripPrefix(routeDomainPostfix, "."));
    }
    route.setSpec(routeSpec);
    String json = null;
    try {
      json = KubernetesHelper.toJson(route);
    } catch (JsonProcessingException e) {
      json = e.getMessage() + ". object: " + route;
    }
  }
  return route;
}

代码示例来源:origin: io.fabric8/fabric8-arquillian

String redirectUri = "http://" + name + namespaceSuffix;
if (Strings.isNotBlank(routeDomain)) {
  redirectUri += "." + Strings.stripPrefix(routeDomain, ".");

相关文章