![JAR search and dependency download from the Maven repository](/logo.png)
com.github.xiaoymin.swaggerbootstrapui.util.CommonUtils Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of swagger-bootstrap-ui Show documentation
Show all versions of swagger-bootstrap-ui Show documentation
Swagger-Bootstrap-UI is the front of the UI Swagger implementation, using jQuery+bootstrap implementation, the purpose is to replace the default UI Swagger implementation of the Swagger-UI, so that the document is more friendly...
/*
* Copyright (C) 2018 Zhejiang xiaominfo Technology CO.,LTD.
* All rights reserved.
* Official Web Site: http://www.xiaominfo.com.
* Developer Web Site: http://open.xiaominfo.com.
*/
package com.github.xiaoymin.swaggerbootstrapui.util;
/***
*
* @since:swagger-bootstrap-ui 1.8.5
* @author [email protected]
* 2018/10/11 13:47
*/
public class CommonUtils {
public static String UpperCase(String str){
StringBuffer aa=new StringBuffer();
int index = 0;
int index22 = 0;
int len = str.length();
begin:
for (int i = 1; i < len; i++) {
if (Character.isUpperCase(str.charAt(i))) {
//判断下一个是大写还是小写
if(Character.isUpperCase(str.charAt(i+1))){
aa.append(str.substring(index, i)).append("");
}else {
aa.append(str.substring(index, i)).append(" ");
}
index = i;
index22=index22+1;
continue begin;
}
index22=0;
}
aa.append(str.substring(index, len));
return aa.toString();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy