Instr()
来源:互联网 发布:协同过滤 矩阵 编辑:程序博客网 时间:2024/06/06 14:16
Instr()
编辑
本词条缺少名片图,补充相关内容使词条更完整,还能快速升级,赶紧来编辑吧!
Instr()函数返回字符或字符串在另一个字符串中第一次出现的位置.
- Instr()
- strToBeSearched, strSearchFor
- 函数
- 返回字符或字符串
目录
Instr()
函数返回字符或字符串在另一个字符串中第一次出现的位置.
表达式 Instr([start, ] strToBeSearched, strSearchFor [, compare])
允许数据类型: Start为搜索的起始值,strToBeSearched接受搜索的字符串 strSearchFor要搜索的字符.compare比较方式(详细见ASP常数)
示范1:
<%
strText = "This is a test!!"
pos = Instr(strText, "a")
response.write pos
%>
返回结果: 9
备注:如果接受搜索的字符串中没有要搜索的字符串,则返回结果为0。
示范2:
<%
strText = "This is a test!!"
pos = Instr(strText, "b")
response.write pos
%>
返回结果: 0
计算某一目标字符串在另一字符串中出现的次数
Function CountStrings(longstring, target)
Dim position, count
position = 1
Do While InStr(position, longstring, target)
position = InStr(position, longstring, target) + 1
count = count + 1
Loop
CountStrings = count '函数返回计算结果
End Function
0 0
- instr
- Instr()
- INSTR
- INSTR
- Instr()
- instr
- InStr函数
- Instr Function
- Instr函数
- instr函数
- instr用法
- InStr 函数
- oracle instr
- ORACLE INSTR()
- INSTR方法
- oracle instr
- Instr 函数
- SUBSTR,INSTR
- Zookeeper学习(Curator使用)
- Linux命令-1:ls命令
- RabbitMQ (三) 发布/订阅
- 数据库操作规范
- MySQL中进行树状所有子节点的查询
- Instr()
- 《HttpClient容易忽视的细节——连接关闭》
- 顶点着色器-经过的空间变换
- CPU使用率计算方法,附带c代码例子
- RabbitMQ (四) 路由选择 (Routing)
- oracle 上的实体化视图日志比上次刷新后的内容新 解决方案
- 上传头像
- 安卓选择图片或拍照获取的照片过大时,裁剪图片
- 算法-第四版-练习1.2.19解答