|
**********************************************************************
* Procedure - #standardize *
* Description - Receive a character string and convert any special *
* characters to acceptable characters. *
* Note: changeFrom / changeTo strings must be in the *
* matching order so that the correct characters *
* are changed to their correct conterparts. *
* Input - inString - string to be manipulated *
* - changeFrom - change from this character *
* - changeTo - change to this character *
* Output - outString *
**********************************************************************
p #standardize b export
d #standardize pi 1024a
d inString 1024a const
d changeFrom 1024a const
d changeTo 1024a const
/free
return %xlate( changeFrom : changeTo : inString );
/end-free
p #standardize e
**********************************************************************
If you wanted to get rid of extra spacing you could always do this:
Eval pos = %scan(' ': string)
DOW pos > 0
Eval string = %Replace(' ' : string : pos : 1)
Eval pos = %scan(' ': string)
Enddo
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.