Posted By

webonomic on 10/02/08


Tagged

String count


Versions (?)

Count up the number of substrings in a string


 / Published in: SAS
 

URL: http://jaredprins.squarespace.com/blog/2008/10/7/some-sas-code-snippets.html

  1. data _null_ ;
  2.  
  3. long='a b c d a e d a e t g d a c s' ;
  4.  
  5. num_a=countc(long,'a') ;
  6.  
  7. put num_a= ;
  8.  
  9. run ;

Report this snippet  

You need to login to post a comment.