惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

D
Docker
爱范儿
爱范儿
T
The Exploit Database - CXSecurity.com
量子位
T
Tailwind CSS Blog
T
Threatpost
The GitHub Blog
The GitHub Blog
AWS News Blog
AWS News Blog
云风的 BLOG
云风的 BLOG
K
Kaspersky official blog
P
Proofpoint News Feed
博客园 - 司徒正美
L
LangChain Blog
T
Threat Research - Cisco Blogs
C
CERT Recently Published Vulnerability Notes
罗磊的独立博客
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - 叶小钗
S
Secure Thoughts
The Last Watchdog
The Last Watchdog
Spread Privacy
Spread Privacy
H
Hacker News: Front Page
T
Troy Hunt's Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Google DeepMind News
Google DeepMind News
W
WeLiveSecurity
A
Arctic Wolf
Apple Machine Learning Research
Apple Machine Learning Research
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
P
Proofpoint News Feed
T
Tor Project blog
T
The Blog of Author Tim Ferriss
I
Intezer
P
Privacy & Cybersecurity Law Blog
美团技术团队
N
Netflix TechBlog - Medium
博客园_首页
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
V
Vulnerabilities – Threatpost
Application and Cybersecurity Blog
Application and Cybersecurity Blog
G
Google Developers Blog
Attack and Defense Labs
Attack and Defense Labs
T
Tenable Blog
月光博客
月光博客
Stack Overflow Blog
Stack Overflow Blog
J
Java Code Geeks
腾讯CDC
Microsoft Security Blog
Microsoft Security Blog
A
About on SuperTechFans
Last Week in AI
Last Week in AI

博客园 - james.dong

初次使用T4引擎生成数据库表实体 - james.dong - 博客园 加快大表关联查询的速度(oracle) DataTable 排序 - james.dong - 博客园 查询oracle数据库中所有视图和表的信息 日期验证正规表达式( YYYY-MM-DD YYYY-MM-DD hh:mm:ss YYYY/MM/DD) windows2000server下 iis 无法下载 .exe , .dll文件的解决办法。 - james.dong C#中datagridview使用技巧系列谈(-)让输入焦点从左到右收藏 oracle中创建自增字段 .net 序列化和反序列化自定义treenode类 LotusScript基础知识(二) LotusScript基本语法知识(一) LotusScript中Option 的含义 System.Xml.XmlDocument.SelectNodes() 查询不到节点问题? - james.dong - 博客园 Combox控件实现类似TextBox控件的ReadOnly=true时的背景颜色和字体颜色!(WinForm) WPF 中的 BitmapEffect 的 各种样式 WPF相关文章汇总 使用List泛型,怎么排序 asp.net2.0解决用户控件图片相对路径出错的问题,ResolveUrl的用法 window.showModalDialog()时没有显示修改后的数据 - james.dong - 博客园
Lotusscript中Instr()函数的功能和用法
james.dong · 2008-12-05 · via 博客园 - james.dong

返回 Variant (Long),指定一字符串在另一字符串中最先出现的位置

InStr([start, ]string1, string2[, compare])

部分 说明 
start 可选参数。为数值表达式,设置每次搜索的起点。如果省略,将从第一个字符的位置开始。
如果 start 包含 Null,将发生错误。如果指定了 compare 参数,则一定要有 start 参数。 
string1 必要参数。接受搜索的字符串表达式。 
string2 必要参数。被搜索的字符串表达式。 
Compare 可选参数。指定字符串比较。如果 compare 是 Null,将发生错误。
如果省略 compare,Option Compare 的设置将决定比较的类型。 

本示例使用 InStr 函数来查找某字符串在另一个字符串中首次出现的位置。

Dim SearchString, SearchChar, MyPos
SearchString ="XXpXXpXXPXXP" ' 被搜索的字符串。
SearchChar = "P" ' 要查找字符串 "P"。

' 从第四个字符开始,以文本比较的方式找起。返回值为 6(小写 p)。
' 小写 p 和大写 P 在文本比较下是一样的。
MyPos = Instr(4, SearchString, SearchChar, 1) 

' 从第一个字符开使,以二进制比较的方式找起。返回值为 9(大写 P)。
' 小写 p 和大写 P 在二进制比较下是不一样的。
MyPos = Instr(1, SearchString, SearchChar, 0)

' 缺省的比对方式为二进制比较(最后一个参数可省略)。
MyPos = Instr(SearchString, SearchChar) ' 返回 9。

MyPos = Instr(1, SearchString, "W") ' 返回 0。