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

Null terminated values

 
Eiji Seki
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

In my spec, it states that String values stored in the data file are null terminated if shorter than field length. The strange part is that there are no null's in the values in the data file that came with the spec. This way, all values end up with blank spaces to the right of the text.

Should I keep those blank spaces and stick to the specification? Or should I right trim it? If I don't trim the values, I will need to append right spaces when the user search for exact matches, or else he will need to provide the blank spaces as well.

Has anyone faced this problem? I'm working on URLyBird 1.3.3.

Thanks
 
Kevin Conaway
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Eiji,

I think this is one of the places where Sun deliberately confuses you. On the one hand, the spec suggests that the values should be null terminated. However, the database format (which the spec says you must stick to) uses non-null terminated values.

Its deliberately confusing to force you to make a decision.

Kevin
 
Eiji Seki
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I thought so...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic