mirror of
https://github.com/chillzhuang/blade-tool
synced 2024-12-12 12:19:27 +08:00
🎉 2.0.7.RELEASE
This commit is contained in:
parent
f92f218266
commit
a26bbc36ca
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.springblade</groupId>
|
<groupId>org.springblade</groupId>
|
||||||
<artifactId>blade-tool</artifactId>
|
<artifactId>blade-tool</artifactId>
|
||||||
<version>2.0.6</version>
|
<version>2.0.7</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>blade-tool</artifactId>
|
<artifactId>blade-tool</artifactId>
|
||||||
<groupId>org.springblade</groupId>
|
<groupId>org.springblade</groupId>
|
||||||
<version>2.0.6</version>
|
<version>2.0.7</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>blade-tool</artifactId>
|
<artifactId>blade-tool</artifactId>
|
||||||
<groupId>org.springblade</groupId>
|
<groupId>org.springblade</groupId>
|
||||||
<version>2.0.6</version>
|
<version>2.0.7</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>blade-tool</artifactId>
|
<artifactId>blade-tool</artifactId>
|
||||||
<groupId>org.springblade</groupId>
|
<groupId>org.springblade</groupId>
|
||||||
<version>2.0.6</version>
|
<version>2.0.7</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>blade-tool</artifactId>
|
<artifactId>blade-tool</artifactId>
|
||||||
<groupId>org.springblade</groupId>
|
<groupId>org.springblade</groupId>
|
||||||
<version>2.0.6</version>
|
<version>2.0.7</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>blade-tool</artifactId>
|
<artifactId>blade-tool</artifactId>
|
||||||
<groupId>org.springblade</groupId>
|
<groupId>org.springblade</groupId>
|
||||||
<version>2.0.6</version>
|
<version>2.0.7</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>blade-tool</artifactId>
|
<artifactId>blade-tool</artifactId>
|
||||||
<groupId>org.springblade</groupId>
|
<groupId>org.springblade</groupId>
|
||||||
<version>2.0.6</version>
|
<version>2.0.7</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.springblade</groupId>
|
<groupId>org.springblade</groupId>
|
||||||
<artifactId>blade-tool</artifactId>
|
<artifactId>blade-tool</artifactId>
|
||||||
<version>2.0.6</version>
|
<version>2.0.7</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
@ -1365,6 +1365,7 @@ public class StringUtil extends org.springframework.util.StringUtils {
|
|||||||
* @return String
|
* @return String
|
||||||
*/
|
*/
|
||||||
public static String humpToUnderline(String para) {
|
public static String humpToUnderline(String para) {
|
||||||
|
para = lowerFirst(para);
|
||||||
StringBuilder sb = new StringBuilder(para);
|
StringBuilder sb = new StringBuilder(para);
|
||||||
int temp = 0;
|
int temp = 0;
|
||||||
for (int i = 0; i < para.length(); i++) {
|
for (int i = 0; i < para.length(); i++) {
|
||||||
@ -1376,6 +1377,44 @@ public class StringUtil extends org.springframework.util.StringUtils {
|
|||||||
return sb.toString().toLowerCase();
|
return sb.toString().toLowerCase();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 横线转驼峰
|
||||||
|
*
|
||||||
|
* @param para 字符串
|
||||||
|
* @return String
|
||||||
|
*/
|
||||||
|
public static String lineToHump(String para) {
|
||||||
|
StringBuilder result = new StringBuilder();
|
||||||
|
String[] a = para.split("-");
|
||||||
|
for (String s : a) {
|
||||||
|
if (result.length() == 0) {
|
||||||
|
result.append(s.toLowerCase());
|
||||||
|
} else {
|
||||||
|
result.append(s.substring(0, 1).toUpperCase());
|
||||||
|
result.append(s.substring(1).toLowerCase());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 驼峰转横线
|
||||||
|
*
|
||||||
|
* @param para 字符串
|
||||||
|
* @return String
|
||||||
|
*/
|
||||||
|
public static String humpToLine(String para) {
|
||||||
|
para = lowerFirst(para);
|
||||||
|
StringBuilder sb = new StringBuilder(para);
|
||||||
|
int temp = 0;
|
||||||
|
for (int i = 0; i < para.length(); i++) {
|
||||||
|
if (Character.isUpperCase(para.charAt(i))) {
|
||||||
|
sb.insert(i + temp, "-");
|
||||||
|
temp += 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return sb.toString().toLowerCase();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
4
pom.xml
4
pom.xml
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
<groupId>org.springblade</groupId>
|
<groupId>org.springblade</groupId>
|
||||||
<artifactId>blade-tool</artifactId>
|
<artifactId>blade-tool</artifactId>
|
||||||
<version>2.0.6</version>
|
<version>2.0.7</version>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<name>blade-tool</name>
|
<name>blade-tool</name>
|
||||||
<description>
|
<description>
|
||||||
@ -36,7 +36,7 @@
|
|||||||
</scm>
|
</scm>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<blade.tool.version>2.0.6</blade.tool.version>
|
<blade.tool.version>2.0.7</blade.tool.version>
|
||||||
|
|
||||||
<java.version>1.8</java.version>
|
<java.version>1.8</java.version>
|
||||||
<maven.plugin.version>3.8.0</maven.plugin.version>
|
<maven.plugin.version>3.8.0</maven.plugin.version>
|
||||||
|
Loading…
Reference in New Issue
Block a user