|
|||
|
Heres a one-liner that emulates the V9 countc function.
%macro countC(string, char) ; length(&string) -(length(compress(x,&char)!!'#')-1) %mend countC ; data _null_ ; input x $ && ; y=%countC(x,'a') ; put x= y= ; cards ; a a aa a this has run ; 2009/6/24 Shaik Hymad <hymadsk@gmail.com>: > Hi all, > > is there any function in SAS 8.2, which counts number of words or > specified charecters in a string.. > > bye > hymad > |
|
|
||||
|
||||
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|