本文整理了Java中io.fabric8.utils.Strings.stripPrefix()
方法的一些代码示例,展示了Strings.stripPrefix()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Strings.stripPrefix()
方法的具体详情如下:
包路径:io.fabric8.utils.Strings
类名称: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, ".");
内容来源于网络,如有侵权,请联系作者删除!