|
@@ -643,30 +643,17 @@ public class StringUtils {
|
|
|
char[] chars = input.toCharArray();
|
|
|
for (int i = 0; i < chars.length; i++) {
|
|
|
char c = chars[i];
|
|
|
-<<<<<<< HEAD
|
|
|
- boolean isUpperCaseAndPreviousIsUpperCase = (Character.isUpperCase(previousChar)) && (Character.isUpperCase(
|
|
|
- c));
|
|
|
- boolean isUpperCaseAndPreviousIsLowerCase = (Character.isLowerCase(previousChar)) && (Character.isUpperCase(
|
|
|
- c));
|
|
|
-=======
|
|
|
boolean isUpperCaseAndPreviousIsUpperCase = (Character.isUpperCase(previousChar)) && (Character.isUpperCase(c));
|
|
|
boolean isUpperCaseAndPreviousIsLowerCase = (Character.isLowerCase(previousChar)) && (Character.isUpperCase(c));
|
|
|
->>>>>>> dev
|
|
|
|
|
|
boolean previousIsWhitespace = Character.isWhitespace(previousChar);
|
|
|
boolean lastOneIsNotUnderscore = (buf.length() > 0) && (buf.charAt(buf.length() - 1) != '_');
|
|
|
boolean isNotUnderscore = c != '_';
|
|
|
-<<<<<<< HEAD
|
|
|
- if ((lastOneIsNotUnderscore) && ((isUpperCaseAndPreviousIsLowerCase) || (previousIsWhitespace) || ((_betweenUpperCases) && (containsLowerCase) && (isUpperCaseAndPreviousIsUpperCase)))) {
|
|
|
- buf.append("_");
|
|
|
- } else if (((separatorAfterDigit) && (Character.isDigit(previousChar)) && (Character.isLetter(c))) || ((separatorBeforeDigit) && (Character
|
|
|
-=======
|
|
|
if ((lastOneIsNotUnderscore) && ((isUpperCaseAndPreviousIsLowerCase) || (previousIsWhitespace) || ((_betweenUpperCases)
|
|
|
&& (containsLowerCase) && (isUpperCaseAndPreviousIsUpperCase)))) {
|
|
|
buf.append("_");
|
|
|
} else if (((separatorAfterDigit) && (Character.isDigit(previousChar))
|
|
|
&& (Character.isLetter(c))) || ((separatorBeforeDigit) && (Character
|
|
|
->>>>>>> dev
|
|
|
.isDigit(c)) && (Character.isLetter(previousChar)))) {
|
|
|
buf.append('_');
|
|
|
}
|
|
@@ -683,11 +670,7 @@ public class StringUtils {
|
|
|
return buf.toString();
|
|
|
}
|
|
|
|
|
|
-<<<<<<< HEAD
|
|
|
public static boolean containsLowerCase(String s) {
|
|
|
-=======
|
|
|
- public static boolean containsLowerCase ( String s ) {
|
|
|
->>>>>>> dev
|
|
|
for (char c : s.toCharArray()) {
|
|
|
if (Character.isLowerCase(c)) {
|
|
|
return true;
|
|
@@ -696,22 +679,10 @@ public class StringUtils {
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
-<<<<<<< HEAD
|
|
|
private static boolean shouldReplace(char c) {
|
|
|
return (c == '.') || (c == '_') || (c == '-');
|
|
|
}
|
|
|
|
|
|
- private static String wordsToHyphenCase(String s) {
|
|
|
- StringBuilder buf = new StringBuilder();
|
|
|
- char lastChar = 'a';
|
|
|
- for (char c : s.toCharArray()) {
|
|
|
- if ((Character.isWhitespace(lastChar)) && (!Character.isWhitespace(c)) && ('-' != c) && (buf.length() > 0) && (buf
|
|
|
- .charAt(buf.length() - 1) != '-')) {
|
|
|
-=======
|
|
|
- private static boolean shouldReplace ( char c ) {
|
|
|
- return (c == '.') || (c == '_') || (c == '-');
|
|
|
- }
|
|
|
-
|
|
|
private static String wordsToHyphenCase ( String s ) {
|
|
|
StringBuilder buf = new StringBuilder();
|
|
|
char lastChar = 'a';
|
|
@@ -719,7 +690,6 @@ public class StringUtils {
|
|
|
if ((Character.isWhitespace(lastChar)) && (!Character.isWhitespace(c))
|
|
|
&& ('-' != c) && (buf.length() > 0)
|
|
|
&& (buf.charAt(buf.length() - 1) != '-')) {
|
|
|
->>>>>>> dev
|
|
|
buf.append("-");
|
|
|
}
|
|
|
if ('_' == c) {
|