rayskeez21 8 years ago
parent
commit
9ea0c79dac
1 changed files with 18 additions and 3 deletions
  1. 18
    3
      StringArrayUtils.java

+ 18
- 3
StringArrayUtils.java View File

@@ -143,13 +143,28 @@ public class StringArrayUtils {
143 143
      * @return array of Strings with consecutive duplicates removes
144 144
      */ // TODO
145 145
     public static String[] removeConsecutiveDuplicates(String[] array) {
146
-        String removeThese = new String();
147
-        int duplicate = getNumberOfOccurrences(array,removeThese);
146
+        int count = 0;
147
+        int duplicate = 0;
148
+        
149
+        for(int i = 0; i < array.length; i++){
150
+            if (array[i].equals(array[i+1])){
151
+                count++;
152
+            }
153
+        }
148 154
         
155
+        String []arr = new String [array.length - counter];
156
+        String strCheese = 
157
+        for(int i= 0;i < array.length; i++){
158
+            if(!array[i].equals()){
159
+            
160
+            }
161
+        
162
+        }
149 163
         return null;
150 164
         
151
-    }
152 165
 
166
+    }
167
+}
153 168
     /**
154 169
      * @param array array of chars
155 170
      * @return array of Strings with each consecutive duplicate occurrence concatenated as a single string in an array of Strings