diff -r d19c48ef5fd1 source/client/application/DataSource.js --- a/source/client/application/DataSource.js Wed Sep 11 23:00:26 2013 +0200 +++ b/source/client/application/DataSource.js Thu Sep 12 14:30:57 2013 +0200 @@ -22765,6 +22765,7 @@ if (operator.startsWith) var result = isc.startsWith(tested, test); else if (operator.endsWith) result = isc.endsWith(tested, test); else if (operator.equals) result = (tested == test); + else if (operator.noBlanks) result = isc.containsNoBlanks(tested, test); else result = isc.contains(tested, test); if (operator.negate) return !result; @@ -23520,6 +23521,17 @@ compareCriteria: stringComparisonComp }, { + ID: "iContainsNoBlanks", + titleProperty: "iContainsTitle", + caseInsensitive: true, + noBlanks: true, + valueType: "fieldType", + condition: stringComparison, + symbol: "~", + canNormalize: true, + compareCriteria: stringComparisonComp + }, + { ID: "iStartsWith", titleProperty: "iStartsWithTitle", startsWith: true, diff -r d19c48ef5fd1 source/client/language/String.js --- a/source/client/language/String.js Wed Sep 11 23:00:26 2013 +0200 +++ b/source/client/language/String.js Thu Sep 12 14:30:57 2013 +0200 @@ -397,6 +397,30 @@ if (string1 == null) return false; return string1.indexOf(substring) > -1; +}, + +// isc.containsNoBlanks() [string helper] +// Similar to isc.contains but blank spaces are not part of the comparison, +// instead they separate different tokens to be found in the text. +// It returns true in case the tested text contains, in order, all the +// tokens separated by blank spaces. +containsNoBlanks : function (tested, test) { + var tokens, token, i, pendingToTest, idx; + if (!tested) { + return true; + } + + tokens = test.split(' '); + pendingToTest = tested; + for (i = 0; i < tokens.length; i++) { + token = tokens[i]; + idx = pendingToTest.indexOf(token); + if (token && idx === -1) { + return false; + } + pendingToTest = pendingToTest.substring(idx + token.length); + } + return true; }, // isc.startsWith() [string helper]