Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ InTouch HMI

StringTest()

  • Last UpdatedOct 08, 2024
  • 1 minute read

テキストの最初の文字をテストして、特定のタイプであるかどうかを判断して結果を返します。

カテゴリ

文字列

構文

DiscreteResult = StringTest( Text, TestType );

パラメータ

テキスト

操作する文字列。実際の文字列または文字列属性。

テストタイプ

テストのタイプを指定します。可能な値は以下のとおりです。

1 = 英数字(A ~ Z、a ~ z、および 0 ~ 9)

2 = 数字(0 ~ 9)

3 = 英字(A ~ Z、a ~ z)

4 = 大文字の英字(A ~ Z)

5 = 小文字の英字(a ~ z)

6 = 句読文字(0x21 ~ 0x2F)

7 = ASCII 文字(0x00 ~ 0x7F)

8 = 16 進文字 (A ~ F、a ~ f、または 0 ~ 9)

9 = 印刷可能文字(0x20 ~ 0x7E)

10 = 制御文字(0x00 ~ 0x1F または 0x7F)

11 = 空白文字(0x09 ~ 0x0D または 0x20)

備考

Text の最初の文字が TestType で指定したタイプである場合、StringTest() 関数は DiscreteResult に True を返します。それ以外の場合は、False が返されます。StringTest() 関数に複数の文字が含まれる場合、属性の最初の文字だけがテストされます。

StringTest("ACB123",1) ' 戻り値 1;

StringTest("ABC123",5) ' 戻り値 0;

次もご確認ください。

StringASCII()

StringChar()

StringFromIntg()

StringFromReal()関数

StringFromTime()関数StringFromTime()

StringInString()関数StringInString()

StringLeft()

StringLen()

StringLower()

StringMid()

</StringReplace>

StringRight()

StringSpace()

StringToIntg()

StringToReal()

StringTrim()

StringUpper()

Text()

In This Topic
Related Links