File tree Expand file tree Collapse file tree
main/java/org/apache/commons/csv
test/java/org/apache/commons/csv Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -198,6 +198,13 @@ public CSVFormat withTrailingSpacesIgnored(boolean trailingSpacesIgnored) {
198198 return format ;
199199 }
200200
201+ public CSVFormat withSurroundingSpacesIgnored (boolean surroundingSpacesIgnored ) {
202+ CSVFormat format = clone ();
203+ format .leadingSpacesIgnored = surroundingSpacesIgnored ;
204+ format .trailingSpacesIgnored = surroundingSpacesIgnored ;
205+ return format ;
206+ }
207+
201208 public boolean isUnicodeEscapesInterpreted () {
202209 return unicodeEscapesInterpreted ;
203210 }
Original file line number Diff line number Diff line change @@ -57,6 +57,8 @@ public void testMutators() {
5757
5858 assertEquals (false , format .withLeadingSpacesIgnored (false ).isLeadingSpacesIgnored ());
5959 assertEquals (false , format .withTrailingSpacesIgnored (false ).isTrailingSpacesIgnored ());
60+ assertEquals (false , format .withSurroundingSpacesIgnored (false ).isLeadingSpacesIgnored ());
61+ assertEquals (false , format .withSurroundingSpacesIgnored (false ).isTrailingSpacesIgnored ());
6062 assertEquals (false , format .withEmptyLinesIgnored (false ).isEmptyLinesIgnored ());
6163 assertEquals (false , format .withUnicodeEscapesInterpreted (false ).isUnicodeEscapesInterpreted ());
6264 }
You can’t perform that action at this time.
0 commit comments