Date: Mon, 26 Jul 1999 16:21:30 -0600
Reply-To: Fanchon Finucane <fanchon.finucane@ABACUS-DIRECT.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Fanchon Finucane <fanchon.finucane@ABACUS-DIRECT.COM>
Subject: Q. about translation of string chars
Content-Type: text/plain; charset="us-ascii"
Hello SAS-L,
Is there slick way in SAS to translate a character in a string to 2+
characters? For example, to translate the character 'A' into 'G4F' in a
character variable?
The TRANSLATE function appears to only do a 1-to-1 character translation.
Right now, we are using a do loop to loop through each char of the text
string and when it comes across the desired character, replace it with its
2+ char replacement. Is there anything out there that's more efficient?
Thanks for your help!
|