Count up the number of characters in a string


/ Published in: SAS
Save to your folder(s)



Copy this code and paste it in your HTML
  1. data _null_ ;
  2.  
  3. long='dog cat rat bat dog camel dingo snake bigdog' ;
  4.  
  5. num_dog=count(long,'dog') ;
  6.  
  7. put num_dog= ;
  8.  
  9. run ;

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

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.