Data Type String

From emotive
Jump to: navigation, search


Name String
Short Description String value
Class Simple Data Type
Base Data Type SimpleType
Default Value ""
Provide a Literal Yes
SpecifiedBy ISO 13209-2
Standard Compliant Yes


The String data type identifies OTX in a sequence of zero or more characters.

Core Conversion

The following table shows the rules for conversion to another data type:

Conversion Result Sample
ToBoolean Returns true if the 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


String StringVariable = "";