/*
- * Copyright 2009 Electronic Business Systems Ltd.
+ * Copyright 2009, 2010 Electronic Business Systems Ltd.
*
* This file is part of GSS.
*
var logger = $wnd.console;
if (logger && logger.debug)
logger.debug(message);
+ else if (logger && logger.log)
+ logger.log(message);
}-*/;
/**
styleRow(table, row, true, styleName);
return row;
}
+ /**
+ * The implementation of this trim method also checks for
+ * no brake space characters (nbsp) = '\00A0'
+ * and removes them
+ *
+ * @param input
+ * @return the new trimmed string without whitespace or no brake space
+ */
+ public static native String trim(String input) /*-{
+ if(input.length == 0)
+ return input;
+ if((input[0]||input[input.length-1]) != '\u0020' && (input[0]||input[input.length-1]) != '\u00A0')
+ return input;
+ var r1 = input.replace(/^(\s*)/, '');
+ var r2 = r1.replace(/\s*$/, '');
+ return r2;
+ }-*/;
}