LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (April 1997, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Fri, 11 Apr 1997 12:52:19 -0700
Reply-To:   Karsten Self <kmself@PMSQUARED.COM>
Sender:   "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From:   Karsten Self <kmself@PMSQUARED.COM>
Subject:   Re: Text conversion to lowercase
Comments:   To: "Nguyen, Loan - TPLXN" <lnguyen@PACENT.COM>
Content-Type:   text/plain; charset="us-ascii"

How about:

44 %macro mixcase( arg ); 45 ( trim( 46 trim( substr( &arg, 1, 1 )) || 47 trim( lowcase( substr( &arg, 2, length( &arg ) - 2 ))) 48 )) 49 %mend; 50 51 data _null_; 52 a = "THIS IS ALL CAPS"; 53 b = %mixcase( a ); MPRINT(MIXCASE): ( TRIM( TRIM( SUBSTR( A, 1, 1 )) || TRIM( LOWCASE( SUBSTR( A, 2, LENGTH( A ) - 2 ))) )) 54 put _all_; 55 run;

A=THIS IS ALL CAPS B=This is all cap _ERROR_=0 _N_=1 NOTE: DATA statement used: real time 0:00:00.06 user cpu time 0:00:00.01 system cpu time 0:00:00.01 memory 41 K

>Karsten M. Self >PM Squared, Inc. >444 Market Street, Suite 1000 >San Francisco, CA 94111 > What part of 'gestalt' don't you understand?

>---------- >From: Nguyen, Loan - TPLXN[SMTP:lnguyen@PACENT.COM] >Sent: Friday, April 11, 1997 11:13 AM >To: Multiple recipients of list SAS-L >Subject: Text conversion to lowercase > >I'm trying to convert text from uppercase to lowercase, but still leaving the >first letter of each word in uppercase. For example: MR. JOHN B. SMITH to >Mr. John B. Smith. SAS has a lowercase function but this function converts >everything into lowercase. > >Does anyone has a utility/macro out there to handle this dilema? Thanks in >advance. > >Loan X Nguyen >


Back to: Top of message | Previous page | Main SAS-L page