LANG-1300: fixed formatting on CharSequenceUtils.java
This commit is contained in:
parent
c7c424fb9c
commit
a8f41ec97d
|
@ -75,23 +75,22 @@ public class CharSequenceUtils {
|
|||
if (start < 0) {
|
||||
start = 0;
|
||||
}
|
||||
if(searchChar < Character.MIN_SUPPLEMENTARY_CODE_POINT){
|
||||
for (int i = start; i < sz; i++) {
|
||||
if (cs.charAt(i) == searchChar) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
if (searchChar < Character.MIN_SUPPLEMENTARY_CODE_POINT) {
|
||||
for (int i = start; i < sz; i++) {
|
||||
if (cs.charAt(i) == searchChar) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//supplementary characters
|
||||
if(searchChar <= Character.MAX_CODE_POINT){
|
||||
char[] chars = Character.toChars(searchChar);
|
||||
for(int i = start; i < sz; i++){
|
||||
if(cs.charAt(i) == chars[0]){
|
||||
if(i+1 == sz){
|
||||
//supplementary characters (LANG1300)
|
||||
if (searchChar <= Character.MAX_CODE_POINT) {
|
||||
char[] chars = Character.toChars(searchChar);
|
||||
for (int i = start; i < sz; i++) {
|
||||
if (cs.charAt(i) == chars[0]) {
|
||||
if (i + 1 == sz) {
|
||||
break;
|
||||
}
|
||||
if(cs.charAt(i+1) == chars[1]){
|
||||
if (cs.charAt(i + 1) == chars[1]) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
@ -141,23 +140,23 @@ public class CharSequenceUtils {
|
|||
if (start >= sz) {
|
||||
start = sz - 1;
|
||||
}
|
||||
if(searchChar < Character.MIN_SUPPLEMENTARY_CODE_POINT){
|
||||
if (searchChar < Character.MIN_SUPPLEMENTARY_CODE_POINT) {
|
||||
for (int i = start; i >= 0; --i) {
|
||||
if (cs.charAt(i) == searchChar) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(searchChar <= Character.MAX_CODE_POINT){
|
||||
//supplementary characters (LANG1300)
|
||||
if (searchChar <= Character.MAX_CODE_POINT) {
|
||||
char[] chars = Character.toChars(searchChar);
|
||||
for(int i = start; i >= 0; --i){
|
||||
if(cs.charAt(i) == chars[0]){
|
||||
if(i + 1 == cs.length()){
|
||||
break;
|
||||
for (int i = start; i >= 0; --i) {
|
||||
if (cs.charAt(i) == chars[0]) {
|
||||
if (i + 1 == cs.length()) {
|
||||
break;
|
||||
}
|
||||
if(cs.charAt(i+1) == chars[1]){
|
||||
return i;
|
||||
if (cs.charAt(i + 1) == chars[1]) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue