Core Function Str2Hex

From Sputnik Wiki
(Difference between revisions)
Jump to: navigation, search
(Created page with "<pre> Str2Hex( <expression>, <flag> ) </pre> === Description === Convert a string to a hex string. === Parameters === ==== expression ==== The string to use. ==== flag ====...")
 
(flag)
 
(2 intermediate revisions by one user not shown)
Line 15: Line 15:
 
==== flag ====
 
==== flag ====
  
Optional; If higher than 0 the conversion will be in UNICODE.
+
Optional; If TRUE conversion will be in UNICODE.
 +
 
 +
Default: false
  
 
=== Return Value ===
 
=== Return Value ===

Latest revision as of 09:37, 19 September 2015

Str2Hex( <expression>, <flag> )

Contents

Description

Convert a string to a hex string.

Parameters

expression

The string to use.

flag

Optional; If TRUE conversion will be in UNICODE.

Default: false

Return Value

Success: Returns encoded string.

Failure: Returns empty string.

Remarks

None.

Example

// ASCII
$Hex = Str2Hex("Hello World");
println("Hex: '$Hex'");
$Str = Hex2Str($Hex);
println("Str: '$Str'");
 
// Unicode
$Hex = Str2Hex("Hello World", 1);
println("Hex: '$Hex'");
$Str = Hex2Str($Hex, 1);
println("Str: '$Str'");
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox