8.3.23 IsSingleChar (check whether a string is one-byte characters)
- Purpose
-
Checks whether a string is one-byte characters, and returns True or False.
- Syntax
IsSingleChar (String)
- Argument
-
- String
-
Specify the string itself or a variable that stores this value.
False is returned if you specify a zero-length string ("").
- Description
-
The IsSingleChar command checks whether the specified string contains one-byte characters only, and returns True or False as the command execution result.
- Example 1
' Check the value of global variable seqNo, and display "#" ' before a one-byte character or "number" before a two-byte ' character. Dim buff buff = GetGV ( "seqNo" ) If IsSingleChar (buff) Then MessageBox ("#" + buff) Else MessageBox ("item-number" + buff) End If
- Example 2
' Check whether the string stored in local variable buff ' consists of all one-byte characters. Dim buff buff = "JP1/Script" If IsSingleChar ( buff ) Then MessageBox ( "All characters are one-byte characters." ) Else MessageBox ( "Characters other than one-byte characters exist." ) End If
- JP1/Script version
-
Supported from JP1/Script 06-00.