Language Reference Guide : System Classes : LongByteObject Class : ConvertFromString Method
 
Share this page          
ConvertFromString Method
The ConvertFromString method loads the object from a StringObject that holds a representation of binary data that has been converted to text.
This method has the following syntax:
integer = LongByteObject.ConvertFromString(string = StringObject,
          format = integer );
This method has the following parameters:
string
(Required) Specifies the string object that holds the representation of binary data that has been converted to text
format
(Required) Specifies the data format of the text in the string parameter
Valid settings are:
EF_HEX
Indicates that each pair of hexadecimal characters in the string represents a single byte of binary data. For example, the string '00017F' is loaded as three bytes containing the values 0, 1, and 127.
EF_BASE64
Indicates that the string represents binary data that has been converted to text using the Base64 Content-Transfer-Encoding1 algorithm. For example, the string 'AAF/' is loaded as three bytes containing the values 0, 1, and 127.
Descriptions of system constant values and their numeric equivalents are listed in Encoding Format.
This method returns ER_OK if successful. If invalid characters are found outside the alphabet of the specified format or if any other errors occur, the method returns ER_FAIL. Descriptions of system constant values and their numeric equivalents are listed in Error Codes.