全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
4133 0
2010-04-11
call scan(str,n,pos,len[,delims]);
Returns the position and length of the n-th word in a string. If
n < 0, call scan counts words right to left. If n = 0 or |n|> the
number of words in str, call scan returns zero in pos and len.
delims specifies character(s) that separate words. The default
ASCII delimiters are: space . < ( + & ! $ * ) ; ^ - / , % | . The
default EBCDIC delimiters are: space . < ( + | & ! $ * ) ; &not; - / , %
| &cent;. Contiguous delimiters are treated as one. Leading and
trailing delimiters are ignored. To extract the desired word
after calling call scan, use substrn (p. 152).
Examples:
call scan('1 ab xyz',2,pos,len) → pos=3, len=2.
call scan('1 ab xyz',-3,pos,len) → pos=1, len=1.
call scan('1 ab xyz',5,pos,len) → pos=0, len=0.
call scan('1,ab xyz',2,pos,len,',') → pos=3, len=6.
call scan('1,ab xyz',2,pos,len,' ,') → pos=3, len=2.
call scan('123.abc(xyz)',3,pos,len) → pos=9, len=3.
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群