Core Function Str2Hex

From Sputnik Wiki
Revision as of 07:54, 15 December 2011 by UberFoX (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Str2Hex( <expression>, <flag> )

Contents

Description

Convert a string to a hex string.

Parameters

expression

The string to use.

flag

Optional; If higher than 0 the conversion will be in UNICODE.

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