s2h PowerHome formula function
Description
Encodes either a string or file into a hex
encoded string
Syntax
s2h ( as_input, ai_type )
Argument | Description |
as_input | String. The string or a full path and filename
containing the data you would like to encode |
ai_type | Integer. A flag that determines how the as_input
parameter is to be interpreted. A value of 1 indicates to interpret
the data in as_input as a string using the default (UTF8) encoding. A
value of 2 indicates to interpret as_input as a path and filename to read.
A value of 0 (or any other value different from 1 or 2) will result in
as_input being interpreted as a string using ANSI encoding |
Return value
String. Returns the data as a
hex encode string
Usage
Use this function convert string data or
string/binary data contained within a file into a hex
encoded string
Examples
The following examples demonstrate typical syntax/usage for this function.
• s2h("This is a test",0) - Returns
"5468697320697320612074657374"