static public String stripQuotes ( String string0 ) { // if an empty string, return it if ( string0 . length ( ) == 0 ) { return string0 ; } // if the first and last characters are quotes, just do 1 substring if ( string0 . length ( ) > 1 && string0 . charAt ( 0 ) == ' ' && string0 . charAt ( string0 . length ( ) - 1 ) == ' ' ) { return string0 . substring ( 1 , string0 . length ( ) - 1 ) ; } else if ( string0 . charAt ( 0 ) == ' ' ) { string0 = string0 . substring ( 1 ) ; } else if ( string0 . charAt ( string0 . length ( ) - 1 ) == ' ' ) { string0 = string0 . substring ( 0 , string0 . length ( ) - 1 ) ; } return string0 ; }
If present this method will strip off the leading and trailing character in the string parameter . For example 10958 will becomes just 10958 .