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 (December 1999, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Tue, 21 Dec 1999 07:50:58 +0000
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Roland <roland.rashleigh-berry@VIRGIN.NET>
Organization:   N/A
Subject:   Re: Number of words in a string ?
Content-Type:   text/plain; charset=us-ascii

cpwong wrote: > > Hi friends, > Is there any SAS function that return the number of words in a string ? > Many thanks. > cpwong

Nope. You'll have to code it by hand.

data _null_; str="aa bb cc dd ee ff"; i=1; do until(scan(str,i," ")=' '); i=i+1; end; words=i-1; put words=; run;


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