[resolved] String padding with space?

One Star

[resolved] String padding with space?

Hello,
When I tried to import "StringUtils" it fails at execution
StringUtils.rightPad(val, ln, ' ')
Any other idea to padd with space a string and avoid automatic "TRIM".
Kind regards,
JNB

Accepted Solutions
One Star

Re: [resolved] String padding with space?

In fact, it was a bug resolved in TOS 3.2.3
see bugTracker 0012692 for more details!
Special Thanks to MHIRT for prompt reply on BugTracker!
JNB

All Replies
One Star

Re: [resolved] String padding with space?

with the use of ( StringBuilder sb = new StringBuilder(); ... sb.append(' ');
the output String is also trimed...
I wander how it succeeds in an outputPositionalFile when padding char is used with a StringBuilder...
One Star

Re: [resolved] String padding with space?

The trouble is that I have an outputFileDelimited that is a mix between a CSV file and a positional file
field separator " "
CSV options file with Escape char "\"" and Text enclosure as well "\""
so I can manage to generate:
"4" "AIEOxxxx" "1"
"4" "AIxxxxxx" "0"
but not
"4" "AIEO " "1"
"4" "AI " "0"
I always have
"4" "AIEO" "1"
"4" "AI" "0"
as the " text enclosure is added after data manipulation and the String is trimed automatcically; spaces are deleted!!
It seems complicated to deal with these schema. (I use TOS 3.1.4)
In the positional file, I can't have text enclosure and in the delimeted file, I can't pad with space!!
Any help would be much appreciated!
kind regards,
JNB
One Star

Re: [resolved] String padding with space?

In fact, it was a bug resolved in TOS 3.2.3
see bugTracker 0012692 for more details!
Special Thanks to MHIRT for prompt reply on BugTracker!
JNB