macro function %index

Reply
N/A
Posts: 0

macro function %index

Hi

I need the number of character in string.
If I do like this:
%let str = 'new year';
%let spsPos = %index(&str,y);

It's ok. spsPos = 5. But how can I see the position of space?
I have tried like this:
%let spsPos = %index(&str, );
like this:
%let spsPos = %index(&str,' ');
and like this:
%let spsPos = %index(&str);
That doesn't work.
N/A
Posts: 0

Re: macro function %index

Sorry Smiley Happy

The answer is %let spsPos = %index(&str,%quote( ));
Post a Question
Discussion Stats
  • 1 reply
  • 274 views
  • 0 likes
  • 1 in conversation