楼主: 夭妖
11051 15

【请教】find function [推广有奖]

  • 0关注
  • 0粉丝

博士生

40%

还不是VIP/贵宾

-

威望
0
论坛币
499 个
通用积分
0
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
9933 点
帖子
222
精华
0
在线时间
371 小时
注册时间
2008-3-7
最后登录
2021-5-5

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
RT~本人不是很明白这个函数~
请高手指点一下吧~非常谢谢~
二维码

扫码加我 拉你入群

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

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

关键词:function find CTI Fin Fun 请教 find function

回帖推荐

crackman 发表于2楼  查看完整内容

find(str,substr[,modifiers][,start_pos]) find(str,substr[,start_pos][,modifiers]) Searches a string for a substring and returns the first position at which it’s found, or zero (0) if it’s not found. For a descrip- tion of start_pos see any (p. 10). modifiers is one or more of the values listed in the following table. modifiers Means i Ignore character case during the search. If this mo ...

本帖被以下文库推荐

沙发
crackman 发表于 2010-4-19 10:03:13 |只看作者 |坛友微信交流群
find(str,substr[,modifiers][,start_pos])
find(str,substr[,start_pos][,modifiers])
Searches a string for a substring and returns the first position
at which it’s found, or zero (0) if it’s not found. For a descrip-
tion of  start_pos see any<chartype> (p. 10). modifiers is one
or more of the values listed in the following table.
modifiers Means
i Ignore character case during the search. If this modifier
is omitted, the search is case-sensitive.
t Trim trailing spacing from str and substr.
Examples:
str='She sells seashells? Yes, she does.';
find(str,'she ') → 27.
find(str,'she ','i') → 1.
find(str,'she ','i',5) → 27.
find(str,'she ','it',5) → 14.
find(str,'she ','it') → 1.
已有 2 人评分经验 论坛币 学术水平 热心指数 收起 理由
bakoll + 3 + 3 精彩帖子
夭妖 + 1 + 1 谢谢啦~!

总评分: 经验 + 3  论坛币 + 3  学术水平 + 1  热心指数 + 1   查看全部评分

使用道具

藤椅
soporaeternus 发表于 2010-4-19 10:17:11 |只看作者 |坛友微信交流群
版主说得挺清楚了,楼主sas help多看看,很有"帮助"的
Let them be hard, but never unjust

使用道具

板凳
夭妖 发表于 2010-4-19 10:34:01 |只看作者 |坛友微信交流群
谢谢各位~本人不才~
help里没看懂~才来请教的~
~~o(>_<)o ~~

使用道具

报纸
horace_chen 发表于 2010-4-19 11:16:28 |只看作者 |坛友微信交流群
find有两种返回值,找到的返回找到的第一个字符位置,没找到则返回“0”,一般结合字符截取函数如substr()使用

str='She sells seashells? Yes, she does.';
find(str,'she ') → 27.   
      区分大小写,从str第1个字符开始查找,返回位置27
find(str,'she ','i') → 1.
     不区分大小写,从str第1个字符开始查找,返回位置1
find(str,'she ','i',5) → 27.
     不区分大小写,从str第5个字符开始查找,返回位置27
find(str,'she ','it',5) → 14.
      不区分大小写,不匹配‘she ’和str空白字符,从str第5个字符开始查找,返回位置14
find(str,'she ','it') → 1.
       不区分大小写,不匹配‘she ’和str空白字符,从str第1个字符开始查找,返回位置1
已有 2 人评分学术水平 热心指数 信用等级 收起 理由
灯小登 + 1 + 1 + 1 精彩帖子
夭妖 + 1 + 1 非常谢谢

总评分: 学术水平 + 2  热心指数 + 2  信用等级 + 1   查看全部评分

使用道具

地板
crackman 发表于 2010-4-19 11:27:28 |只看作者 |坛友微信交流群
楼主这样你该明白了吧

使用道具

7
soporaeternus 发表于 2010-4-19 11:39:41 |只看作者 |坛友微信交流群
顺便问下楼主的头像是谁啊......
Let them be hard, but never unjust

使用道具

8
crackman 发表于 2010-4-19 11:46:29 |只看作者 |坛友微信交流群
7# soporaeternus
呵呵
就是楼主本人啊

使用道具

9
夭妖 发表于 2010-4-19 12:26:46 |只看作者 |坛友微信交流群
谢谢LS各位~现在明白了~
不过有点晕~
{:3_60:}

使用道具

10
gzjb 发表于 2010-4-19 12:31:33 |只看作者 |坛友微信交流群
Why don't you just  google "SAS, find() or find function"?

It's just 3 seconds.
A joke:
If you couldn't decide affairs in your family , then just ask your wife.
If you couldn't decide affairs outside your family , then just ask your GOOGLE.

Have fun.

使用道具

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群

京ICP备16021002-2号 京B2-20170662号 京公网安备 11010802022788号 论坛法律顾问:王进律师 知识产权保护声明   免责及隐私声明

GMT+8, 2024-4-23 18:35