文字列から数字を検索し、最初に検索された数字の位置を返します。
| カテゴリ: | 文字 |
| 制限事項: | この関数は、I18Nレベル2に準拠しており、SBCS、DBCSおよびMBCS(UTF8)での使用目的で設計されています。 |
data _null_;
string='Next = _n_ + 12E3;';
j=0;
do until(j=0);
j=anydigit(string, j+1);
if j=0 then put +3 "That's all";
else do;
c=substr(string, j, 1);
put +3 j= c=;
end;
end;
run;j=14 c=1 j=15 c=2 j=17 c=3 That's all