Date: Thu, 28 Nov 1996 23:05:32 -0800
Reply-To: Don Stanley <don_stanley@IBM.NET>
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: Don Stanley <don_stanley@IBM.NET>
Organization: Don Stanley Consulting Limited
Subject: Re: Mixed case Text Function
I usually use the following code, given here by example:
data test ;
x = 'test test test g' ;
/* --- necessary code follows --- */
x = lowcase(x) ;
substr(x,1,1) = upcase(substr(x,1,1)) ;
do i=1 to length (x) -1 ;
if substr(x,i,1) = ' ' then substr(x,i+1,1) = upcase(substr(x,i+1,1))
;
end ;
/* --- end of necessary code --- */
put x= ;
run ;
Cheers
Don
========================================================================Don
Stanley: Don Stanley Consulting Limited
Box 14554, Kilbirnie, Wellington NEW ZEALAND
Ph 0064 025 479 863, Fax 0064 04 386 2038, email
don_stanley@ibm.net
President: SAS Users Group of New Zealand
Author: Beyond the obvious with SAS Screen Control Language
7 SUGI Papers, 19 SUNZ Papers, about 70 newsletter and
misc articles
Writing: An Applications oriented FRAME text
|