InStr用法

[ 2004-09-09 01:31:22 | Author: zhenhua ]
Font Size: Large | Medium | Small

返回某字符串在另一字符串中第一次出现的位置。
语法
InStr([start, ]string1, string2[, compare])
InStr 函数的语法有以下参数:

参数 描述
start 可选。数值表达式,用于设置每次搜索的开始位置。如果省略,将从第一个字符的位置开始搜索。如果 start 包含 Null,则会出现错误。如果已指定 compare,则必须要有 start 参数。
string1 必选。接受搜索的字符串表达式。
string2 必选。要搜索的字符串表达式。
compare 可选。指示在计算子字符串时使用的比较类型的数值。有关数值,请参阅“设置”部分。如果省略,将执行二进制比较。

设置
compare 参数可以有以下值:
常数 值 描述
vbBinaryCompare 0 执行二进制比较。
vbTextCompare 1 执行文本比较。
vbDatabaseCompare 2 执行基于包含在数据库(在此数据库中执行比较)中的信息的比较。

返回值
Instr 函数返回以下值:
如果 InStr 返回
string1 为零长度 0
string1 为 Null Null
string2 为零长度 start
string2 为 Null Null
string2 没有找到 0
在 string1 中找到 string2 找到匹配字符串的位置
start > Len(string2) 0

说明

--------------------------------------------------------------------------------

注意 InStrB 函数使用包含在字符串中的字节数据,所以 InStrB 返回的不是一个字符串在另一个字符串中第一次出现的字符位置,而是字节位置。
Comments Feed Comments Feed: http://www.zhenhua.org/feed.asp?q=comment&id=201
UTF-8 Encoding Trackback URL: http://www.zhenhua.org/trackback.asp?id=201

View Mode: Show All | Comments: 0 | Trackbacks: 388 | Toggle Order | Views: 26904
Trackback arimidex
[ arimidex | 2012-11-19 03:22:24 ]
Brand and Generic Drugs, Discount Pharmacy. All information about arimidex in one place: http://matile.snn.gr/arimidex/
Trackback buy ventolin nebules
[ buy ventolin nebules | 2012-11-25 02:51:14 ]
Brand and Generic Drugs, Discount Pharmacy. All information about buy ventolin nebules in one place: http://top10.world.mu/ventolin/buy-ventolin-nebules.html
Trackback drugs canada
[ drugs canada | 2012-12-20 21:16:18 ]
Brand and Generic Drugs, Discount Pharmacy. All information about drugs canada in one place: http://membres.multimania.fr/leiss/levodopa/drugs-canada.html
Trackback alprazolam
[ alprazolam | 2012-12-30 20:00:33 ]
Brand and Generic Drugs, Discount Pharmacy. All information about alprazolam in one place: http://perso.wanadoo.es/chica_love111/alprazolam/
Trackback buspirone
[ buspirone | 2013-01-16 02:49:03 ]
Brand and Generic Drugs, Discount Pharmacy. All information about buspirone in one place: http://canada.world.mu/buspirone/
Trackback canadian pharmacy from india
[ canadian pharmacy from india | 2013-01-20 22:53:30 ]
Brand and Generic Drugs, Discount Pharmacy. All information about canadian pharmacy from india in one place: http://digilander.libero.it/amailtuonemico/canadian-pharmacy/canadian-pharmacy-from-india.html
Trackback withdrawal syndromes
[ withdrawal syndromes | 2013-01-26 02:55:24 ]
Brand and Generic Drugs, Discount Pharmacy. All information about withdrawal syndromes in one place: http://xmed.de.ki/valium/withdrawal-syndromes.html
Trackback premarin foals
[ premarin foals | 2013-03-01 09:44:03 ]
Brand and Generic Drugs, Discount Pharmacy. All information about premarin foals in one place: http://perso.wanadoo.es/snot/premarin/premarin-foals.html
Trackback quetiapine
[ quetiapine | 2013-03-10 10:55:21 ]
Brand and Generic Drugs, Discount Pharmacy. All information about quetiapine in one place: http://10top.de.ki/quetiapine/
Trackback clopidogrel online
[ clopidogrel online | 2013-03-26 03:32:22 ]
Brand and Generic Drugs, Discount Pharmacy. All information about clopidogrel online in one place: http://hem.passagen.se/rockfan2/clopidogrel/clopidogrel-online.html
Trackback atarax treatment
[ atarax treatment | 2013-05-30 03:21:52 ]
Brand and Generic Drugs, Discount Pharmacy. All information about atarax treatment in one place: http://condon.altervista.org/atarax/atarax-treatment.html
Trackback metrogel
[ metrogel | 2013-06-24 01:50:34 ]
Brand and Generic Drugs, Discount Pharmacy. All information about metrogel in one place: http://allon.eu.pn/metrogel/
Trackback ambien north carolina
[ ambien north carolina | 2013-07-30 06:49:24 ]
Brand and Generic Drugs, Discount Pharmacy. All information about ambien north carolina in one place: http://perso.wanadoo.es/a.tort/ambien/ambien-north-carolina.html
Trackback buy phentermine 30mg online
[ buy phentermine 30mg online | 2013-08-02 08:31:56 ]
Brand and Generic Drugs, Discount Pharmacy. All information about buy phentermine 30mg online in one place: http://ambron.pluto.ro/phentermine/buy-phentermine-30mg-online.html
Trackback salbutamol hfa
[ salbutamol hfa | 2013-10-09 07:53:56 ]
Brand and Generic Drugs, Discount Pharmacy. All information about salbutamol hfa in one place: http://digilander.libero.it/brothercup/salbutamol/salbutamol-hfa.html
Trackback temple retin a
[ temple retin a | 2013-10-11 07:56:57 ]
Brand and Generic Drugs, Discount Pharmacy. All information about temple retin a in one place: http://magi.wz.cz/retin-a/temple-retin-a.html
Trackback persantine recipe
[ persantine recipe | 2013-10-13 08:58:05 ]
Brand and Generic Drugs, Discount Pharmacy. All information about persantine recipe in one place: http://mohant.altervista.org/persantine/persantine-recipe.html
Trackback mevacor
[ mevacor | 2013-10-20 14:02:30 ]
Brand and Generic Drugs, Discount Pharmacy. All information about mevacor in one place: http://irdar.wz.cz/mevacor/
Trackback ftm testosterone
[ ftm testosterone | 2013-11-02 20:56:11 ]
Brand and Generic Drugs, Discount Pharmacy. All information about ftm testosterone in one place: http://pister.altervista.org/testosterone/ftm-testosterone.html
Trackback ionamin side effects
[ ionamin side effects | 2013-11-28 00:40:56 ]
Brand and Generic Drugs, Discount Pharmacy. All information about ionamin side effects in one place: http://hem.passagen.se/per.soder/ionamin/ionamin-side-effects.html

If you feel this site you find this information helpful, please click on the donation, which is voluntary,Thank you.
Post Comment
Smilies
[arrow] [biggrin] [confused] [cool]
[cry] [eek] [evil] [exclaim]
[frown] [idea] [lol] [mad]
[mrgreen] [neutral] [question] [razz]
[redface] [rolleyes] [sad] [smile]
[surprised] [twisted] [wink]
Enable UBB Codes
Auto Convert URL
Show Smilies
Hidden Comment
Username:   Password:   Register Now?
Security Code * Please Enter the Security Code