Hello Chris,

Am 04.06.2021 um 14:21 schrieb Chris Hird <chrish@xxxxxxxxxxxxxxxxxx>:

Use a for() loop from position n to start of field until a non space is found.

Thanks! That's what I'll do. But I'm a bit surprised that there seem to be no APIs for that on a Platform IBM has been pushing to be webby. Maybe this knowledge has been lost because today, everything is done with SQL…

Another option would be to have a separate field that stores the string length when written.

Since the original strings are fixed length, I don't see a way to get this fixed other than by looping over the individual fields' buffer, and set the byte immediately next to the first non-space character to NUL. Similar to your proposal. Since the buffer will be overwritten with the following _Rreadn anyway, I'll modify the original buffer. Might also save some CPU cycles on my 150. ;-)

Thanks again!

:wq! PoC


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2021 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.