rayskeez21 8 yıl önce
ebeveyn
işleme
9ea0c79dac
1 değiştirilmiş dosya ile 18 ekleme ve 3 silme
  1. 18
    3
      StringArrayUtils.java

+ 18
- 3
StringArrayUtils.java Dosyayı Görüntüle

143
      * @return array of Strings with consecutive duplicates removes
143
      * @return array of Strings with consecutive duplicates removes
144
      */ // TODO
144
      */ // TODO
145
     public static String[] removeConsecutiveDuplicates(String[] array) {
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
         return null;
163
         return null;
150
         
164
         
151
-    }
152
 
165
 
166
+    }
167
+}
153
     /**
168
     /**
154
      * @param array array of chars
169
      * @param array array of chars
155
      * @return array of Strings with each consecutive duplicate occurrence concatenated as a single string in an array of Strings
170
      * @return array of Strings with each consecutive duplicate occurrence concatenated as a single string in an array of Strings