FirstClassトップページ


 ヘルプの目次
このヘルプについて このヘルプについて
 
エンドユーザ向けヘルプ エンドユーザ向けヘルプ
Client Help クライアントヘルプ
Web Help Webアクセスヘルプ
ScreenReader Help スクリーンリーダ
Form フォーム
Synchronization 同期
Definitions 用語
container コンテナ
 
管理者向けヘルプ 管理者向けヘルプ
Administration サーバの管理
Internet Services インターネットサービス
Customization Tools カスタマイズツール(英語)
Administering OTSW OTSWの管理
OTSW Custodian OTSW Custodian
Using FirstClass ED FirstClass ED(英語)
 
バナー:
 
 InStr
 
Purpose
Returns the position of the first occurrence of one string (the search string) within another (the source string).
If the search string is found within the source string, this function returns an integer that indicates the character position of the first occurrence of the string.
If the search string is not found, InStr returns 0.
If the search string is a zero-length string, the start value is returned.
Syntax
InStr ([Start,] SourceString, SearchString [Case])


Start
Must be used if you use Case.
A valid numeric expression used to offset the starting position of the search in SourceString.
If the Start argument is omitted, the default starting offset is 1.
Case
Determines the case sensitivity of the comparison.
If Case is 0, the comparison is case sensitive (example: "a"<>"A").
If Case is 1, the comparison is case insensitive (example: "a"="A").
If the Case argument is omitted, the default behavior is case sensitive comparisons.

Example
Sub Main()
        Dim s As String, Ioc As Integer
        s = "the quick brown fox jumps over the lazy dog"
        Ioc = InStr(s, "fox")
        If Ioc<>0 Then
                Print "The string 'fox' was first found at character position "; Ioc
        Else
                Print "The string 'fox' was not found in the search string"
        End If
End Sub

 

Copyright(C) 2002-2011 FC Management Co. All Rights Reserved