@@ 806-824 (lines=19) @@ | ||
803 | } |
|
804 | return true; |
|
805 | }, |
|
806 | endsWithArray: function(check){ |
|
807 | var list = this; |
|
808 | ||
809 | // quickly test if length sufficient |
|
810 | var clen = check.length; |
|
811 | var mlen = list.length; |
|
812 | if (mlen < clen) { |
|
813 | return false; |
|
814 | } |
|
815 | ||
816 | // check if last slots match |
|
817 | var off = (mlen - clen); |
|
818 | for (var b = 0;b<clen;b++){ |
|
819 | if (list[off + b] != check[b]) { |
|
820 | return false; |
|
821 | } |
|
822 | } |
|
823 | return true; |
|
824 | }, |
|
825 | beginsWith: function(value){ |
|
826 | return this.startsWith(value); |
|
827 | }, |
@@ 68-86 (lines=19) @@ | ||
65 | } |
|
66 | return true; |
|
67 | }, |
|
68 | endsWithArray: function(check){ |
|
69 | var list = this; |
|
70 | ||
71 | // quickly test if length sufficient |
|
72 | var clen = check.length; |
|
73 | var mlen = list.length; |
|
74 | if (mlen < clen) { |
|
75 | return false; |
|
76 | } |
|
77 | ||
78 | // check if last slots match |
|
79 | var off = (mlen - clen); |
|
80 | for (var b = 0;b<clen;b++){ |
|
81 | if (list[off + b] != check[b]) { |
|
82 | return false; |
|
83 | } |
|
84 | } |
|
85 | return true; |
|
86 | }, |
|
87 | beginsWith: function(value){ |
|
88 | return this.startsWith(value); |
|
89 | }, |