public static String fixValue ( String value ) { if ( value != null && ! value . equals ( "" ) ) { final String [ ] words = value . toLowerCase ( ) . split ( "_" ) ; value = "" ; for ( final String word : words ) { if ( word . length ( ) > 1 ) { value += word . substring ( 0 , 1 ) . toUpperCase ( ) + word . substring ( 1 ) + " " ; } else { value = word ; } } } if ( value . contains ( "\\n" ) ) { value = value . replace ( "\\n" , System . getProperty ( "line.separator" ) ) ; } return value ; }
replace under score with space replace \ n char with platform indepent line . separator