Closed JaroslawWiosna closed 6 years ago
investigation started
just to be clear. you want the space to be removed only in field name ? because other fields also contains some additional spaces " 52.23 ", longitude = " 21.012". I have checked the code on some examples and i could not reproduce the problem with the split function itself. Looks like the problem is most likely somewhere else.
maybe getAllFields() was causing the problem but now dunno if it did not change over time
I am changing the results of the investigation after consulting better the problem. Now i know it was not about currently existing faults in our outsanding database which is no surprise. It is about the case if have some additional spaces in between "|" signs. But it can be easiely handled by performing function that will do on all the line taken from the database line.replace() replacing all " " with "" until there will be no more left. I will keep working now to prepare that sort of function soon.
split/DatabaseReader.cpp#L34 :
This is an outstanding algorithm, but let's have a look below:
I am talking about the very last line:
...and there is a trailing space in
name
field. It looks bad and may cause unpleasant issues in the future.