|
I don't' think that would work. If the end of the string was: 'This is a test... the end.' with the 'n' in end on position 37, the end of the %substr would still be '... the en' instead of '... the' Regards, Jim Langston -----Original Message----- From: Joep Beckeringh [mailto:joep@beckeringh.myweb.nl] Sent: Friday, May 24, 2002 2:22 PM To: rpg400-l@midrange.com Subject: RE: Text wrapping question How about (hang on!): %subst(string:1:(%len(%trimr(%subst(string:1:37))))) That should give the next programmer something to think about! Joep Beckeringh > -----Oorspronkelijk bericht----- > Van: rpg400-l-admin@midrange.com > [mailto:rpg400-l-admin@midrange.com] Namens Wills, Mike N. (TC) > Verzonden: donderdag 23 mei 2002 18:47 > Aan: 'rpg400-l@midrange.com' > Onderwerp: RE: Text wrapping question > > > But that won't work in this case, will it? > > >>>Let's say this is my string: > This is a sentence that is longer than what will fit in my field. > > >>>Currently my report looks like this (%subst(string:1:37)): > This is a sentence that is longer tha > n what will fit in my field. > > >>>I want it to look like this (%subst(string:1:last space > but less than > 37)): > This is a sentence that is longer > than what will fit in my field. _______________________________________________ This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@midrange.com To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l or email: RPG400-L-request@midrange.com Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 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.