But how could you live and have no story to tell!
访问统计 original graphics

String.IndexOf 方法 (Char, [startIndex], [count])

报告指定字符在此实例中的第一个匹配项的索引。搜索从指定字符位置开始,并检查指定数量的字符位置。

参数

value

要查找的 Unicode 字符。 对 value 的搜索区分大小写。

startIndex(Int32)

可选项,搜索起始位置。不设置则从0开始。

count(Int32)

可选项,要检查的字符位置数。

返回值

如果找到该字符,则为 value 的索引位置;否则如果未找到,则为 -1。

备注:是按照从左向右的瞬息查找的,如果从右向左,则调用lastIndexOf。
(来源:MSDN:http://msdn2.microsoft.com/zh-cn/library/ms131434(VS.80).aspx

posted on 2007-12-27 12:08  nextsoft  阅读(18157)  评论(1编辑  收藏  举报