=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js' --- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js 2012-10-22 16:02:20 +0000 +++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js 2012-11-01 15:33:54 +0000 @@ -1603,6 +1603,11 @@ return regex.test( value ); } +function startsWith( string, substring ) +{ + return ( string && string.lastIndexOf( substring, 0 ) === 0 ) ? true : false; +} + function isPositiveNumber( value ) { return isNumber( value ) && parseFloat( value ) > 0;