if ( o.containsKey( option_name ) ) {
final String value = o.get( option_name );
if ( !ForesterUtil.isEmpty( value ) ) {
- return value;
+ return value.replaceAll( "\\s+", " " ).trim();
}
else {
throw new IllegalArgumentException( "value for \"" + option_name + "\" is not set" );
return getOptionValue( option_name ).replaceAll( "\"", "" ).replaceAll( "\'", "" );
}
+ public char getOptionValueAsChar( final String option_name ) throws IllegalArgumentException {
+ return getOptionValue( option_name ).charAt( 0 );
+ }
+
public double getOptionValueAsDouble( final String option_name ) throws IOException {
double d = -Double.MAX_VALUE;
try {