IntToHexString

From NWN Lexicon
Revision as of 20:48, 25 August 2012 by Dood (talk | contribs)
Jump to: navigation, search



IntToHexString(int)

This function converts an int to a string representation of the same hexadecimal value.

 [[string | string ]] IntToHexString(
     [[int | int ]] nInteger
 );

Parameters

nInteger

The integer to convert to hexadecimal (base 16).


Description

This function coverts an integer to a hexadecimal string representation of the same value, so that converting 123 to a hexString would yield “0x0000007b”.



Remarks

If the first numeric system you learned was hexadecimal then these values would be useful for you. For the rest of us normal types stick to the basic string representation.


Version

1.30

Example

 int foo = 300;
 string bar =  IntToHexString(foo);

See Also

functions: 

IntToString



 author: Charles Feduke, editor: Lilac Soul, additional contributor(s): Lilac Soul