|
Hi Dave,
Here's one way to do it:
D
InpFld
s
256a Inz( 'MR. SANTA CLAUS' )
D ChrStr s 257a Varying D ChrAry s Like( InpFld ) Dim( 64 ) D ChrFld s Like( InpFld ) D Blank s 1a D Ix s 5u 0 D Ic s 5u 0 D Pb s 5u 0 D Pe s 5u 0 ** D Hi c 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' D Lo c 'abcdefghijklmnopqrstuvwxyz' ** C Eval ChrStr = %TrimR( InpFld ) + Blank ** C Blank Check ChrStr Pb C
DoW
%Found
** C Blank Scan ChrStr: Pb Pe C Eval Ix = Ix + 1 C Eval ChrAry(Ix) = %SubSt( ChrStr: Pb: Pe-Pb ) ** C Blank Check ChrStr: Pe Pb C EndDo ** C Clear ChrStr ** C Do Ix Ic C Hi:Lo Xlate ChrAry(Ic):2 ChrFld C Eval ChrStr = ChrStr + ' ' + %TrimR( ChrFld ) C EndDo ** C Eval InpFld = %SubSt( ChrStr: 2 ) **
C Return ** Best regards,
Carsten Flensburg
|
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.