Subject | was (no subject) PadStringIntToHex() |
---|---|
Author | Adam |
Post date | 2005-07-26T23:26:37Z |
<snip>
Does anyone have a way to convert an integer input into a string
that
is 8 characters left padded with zeros if the hex value is not long
enough.
</snip>
Hi Jeremy,
I can not think of a way to internally do it, but you can research
how
to write a UDF in your favourite language. Basically you create a set
of functions that compile to a .dll or .so (depending on your
platform)
then declare them as external functions. There may be already
functions
to convert int to hex, and pad string that could be used together,
but
not too sure.
In any case I imagine that such a procedure would be relatively
simple
to write in any high level language.
Adam
Does anyone have a way to convert an integer input into a string
that
is 8 characters left padded with zeros if the hex value is not long
enough.
</snip>
Hi Jeremy,
I can not think of a way to internally do it, but you can research
how
to write a UDF in your favourite language. Basically you create a set
of functions that compile to a .dll or .so (depending on your
platform)
then declare them as external functions. There may be already
functions
to convert int to hex, and pad string that could be used together,
but
not too sure.
In any case I imagine that such a procedure would be relatively
simple
to write in any high level language.
Adam