Bug 316568 Refactor data set editor pages' codes[26849]
Build Identifier: 20100610 Refactor data set editor pages' codes. Reproducible: Always
UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/data/ui/util/Utility.java
*/
	public static String getColumnExpression( String columnName )
	{
		Assert.isNotNull( columnName );
		if ( StringUtil.isBlank( columnName ) )
		{
			return null;
		}
		return ExpressionUtil.createJSRowExpression( columnName );
	}
	
	/**
	 * Escapes \ and " following standard of Javascript
	 * 
	 * @param str
	 * @return new string after escape special character
	 */
	public static String escape( String str )
	{
		String[][] chars = {
				{
						"\\\\", "\"", "\'", 
				}, {
						"\\\\\\\\", "\\\\\"", "\\\\\'", 
				}
		};
		String result = str;
		for ( int i = 0; i < chars[0].length; i++ )
		{
			result = result.replaceAll( chars[0][i], chars[1][i] );