Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

String.trim() on read, create and update

 
Marcin Kowalski
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

The old problem but I am confused a bit. I have the well known spec with null-termination stated and space-padding data file provided.

Because it seems obvious to trim when reading, find() should also trim to find anything. If so, for consistency, update() and create() methods should also trim input.

I think it is the most reasonable approach, but I am not sure if I won't get automatic failure with 'trimming everything'

What do you think?
 
Musab Al-Rawi
Ranch Hand
Posts: 231
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think there is no contradiction with trimming user's input then padding spaces at saving.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic