engine/script/src/script_hash.cpp
/*# get hex representation of a hash value as a string
     * Returns a hexadecimal representation of a hash value.
     * The returned string is always padded with leading zeros.
     *
     * @name hash_to_hex
     * @param h [type:hash] hash value to get hex string for
     * @return hex [type:string] hex representation of the hash
     * @examples
     *
     * ```lua
     * local h = hash("my_hash")
     * local hexstr = hash_to_hex(h)
     * print(hexstr) --> a2bc06d97f580aab
     * ```
     */
get hex representation of a hash value as a string
Returns a hexadecimal representation of a hash value.
The returned string is always padded with leading zeros.

@name hash_to_hex
@param h [type:hash] hash value to get hex string for
@return hex [type:string] hex representation of the hash
@examples


get hex representation of a hash value as a string Returns a hexadecimal representation of a hash value . The returned string is always padded with leading zeros . @name hash_to_hex @param h [ type : hash ] hash value to get hex string for @return hex [ type : string ] hex representation of the hash @examples
static int Script_HashToHex(lua_State* L)
    {
        int top = lua_gettop(L);
        dmhash_t hash = dmScript::CheckHash(L, 1);
        char buf[17];
        dmSnPrintf(buf, sizeof(buf), "%016llx", (unsigned long long)hash);
        lua_pushstring(L, buf);
        assert(top + 1 == lua_gettop(L));
        return 1;
    }
static int Script_HashToHex ( lua_State * L ) { int top = lua_gettop ( L ) ; dmhash_t hash = dmScript :: CheckHash ( L , 1 ) ; char buf [ 17 ] ; dmSnPrintf ( buf , sizeof ( buf ) , " " , ( unsigned long long ) hash ) ; lua_pushstring ( L , buf ) ; assert ( top + 1 == lua_gettop ( L ) ) ; return 1 ; }
get hex representation of a hash value as a string
 Returns a hexadecimal representation of a hash value.
get hex representation of a hash value as a string Returns a hexadecimal representation of a hash value .