python 英文分词:请用简单的实例帮我分析一下instr函数的使用?

来源:百度文库 编辑:高考问答 时间:2024/04/30 08:24:36
instr的作用是什么?

instr()
函数返回字符或字符串在另一个字符串中第一次出现的位置.
表达式:Instr([start, strToBeSearched,strSearchFor[, compare])
Start为搜索的起始值
strToBeSearched接受搜索的字符串
strSearchFor要搜索的字符
实例:
<%
strtext="我真的要晕了!"
pos=instr(strtext,"晕")
response.write pos
%>

对asp的使用之一