OTX Reference
|
|
Arbitrary number of characters. More...
Public Attributes | |
StringLiteral | init |
Cardinality [0..1] Initialisation of a String declaration with a literal More... | |
Arbitrary number of characters.
A String stores an arbitrary number of characters. Every character in an OTX String shall have a corresponding UCS/Unicode code point, which is an integer. See UCS ISO/IEC 10646:2011. OTX adheres to the W3C definition of the xsd:string data type.
""
is assigned to the declaration. Conversion | Result | Sample |
---|---|---|
ToBoolean | Returns true if string value is "true" , otherwise false | Boolean b = ToBoolean("123"); // Returns false
|
ToInteger | Returns the integer value of the string | Integer i = ToInteger("123"); // Returns 123
|
ToFloat | Returns the float value of the string | Float f = ToFloat("123"); // Returns 123.0
|
ToString | Returns the copy of the value | String s = ToString("123"); // Returns "123"
|
ToByteField | Returns the UTF-8 encoded value | ByteField bf = ToByteField("123"); // Returns 313233
|
StringLiteral OpenTestSystem.Otx.Core.DataTypes.String.init |
Cardinality [0..1]
Initialisation of a String declaration with a literal