public static String stringValue ( Object value , boolean trim ) { String result ; if ( value == null ) { result = OgnlRuntime . NULL_STRING ; } else { result = value . toString ( ) ; if ( trim ) { result = result . trim ( ) ; } } return result ; }
Evaluates the given object as a String and trims it if the trim flag is true .