#String Formatting
1 messages · Page 1 of 1 (latest)
<@&987246399047479336> please have a look, thanks.
While you are waiting for getting help, here are some tips to improve your experience:
If nobody is calling back, that usually means that your question was not well asked and hence nobody feels confident enough answering. Try to use your time to elaborate, provide details, context, more code, examples and maybe some screenshots. With enough info, someone knows the answer for sure.
Don't forget to close your thread using the command </help-thread close:1027500463647621170> when your question has been answered, thanks.
printWriter.printf("%-41s %-10s Base.%-37s\n",itemPair.get(1),"==>",itemPair.get(0));
btw i got the max length possible for stringOne and stringTwo, that's why using 37 and 41 here.
this is the output im getting, notice the item "Baking Tray"
this happens across the file, in some parts of file it's worse.
what are the spaces before ?
before as in? for category and stuff?
im not sure, ill verify the map to see if all the strings are without any space.
also, why are you using %-10s for "==>" ? it's always the same value
ye i was experimenting with max length stuff in printf, so changed it like that.
oki i think i see the problem, i can see the extra space in my arraylist. Ill work with that.
ty
, i prolly would have wasted an hour or so on this. Didn't even bother to check the input. A simple trim saves the day for now.