Code Duplication    Length = 15-16 lines in 2 locations

src/ub.arrays.strings.js 2 locations

@@ 7-22 (lines=16) @@
4
5
var arrayFuncs = {
6
	
7
	indexOfCI: function(value){
8
		var list = this;
9
		if (list.length == 0) {
10
			return -1;
11
		}
12
		var list = this;
13
		for (var i = 0, il = list.length;i<il;i++){
14
			var str = list[i];
15
			if (str && str.constructor === String) {
16
				if (str.equalsCI(value)){
17
					return i;
18
				}
19
			}
20
		}
21
		return -1;
22
	},
23
24
	lastIndexOfCI: function(value){
25
		var list = this;
@@ 24-38 (lines=15) @@
21
		return -1;
22
	},
23
24
	lastIndexOfCI: function(value){
25
		var list = this;
26
		if (list.length == 0) {
27
			return -1;
28
		}
29
		for (var i = list.length-1;i>=0;i--){
30
			var str = list[i];
31
			if (str && str.constructor === String) {
32
				if (str.equalsCI(value)){
33
					return i;
34
				}
35
			}
36
		}
37
		return -1;
38
	},
39
40
	removeCI: function(value, stringReplace = false){
41
		var list = this;