Page 1 of 1

SGDK How do I convert a u16 to a string?

Posted: Mon Aug 03, 2015 1:26 pm
by matteus
How do I convert a u16 to a string?

Re: SGDK How do I convert a u16 to a string?

Posted: Mon Aug 03, 2015 2:37 pm
by MrTamk1s
matteus wrote:How do I convert a u16 to a string?
There are a few SGDK compatible conversion methods in its string.h file (see the doxygen document). Namely, casting your u16 to a u32 and using the uintToStr() function should suffice

Re: SGDK How do I convert a u16 to a string?

Posted: Tue Aug 04, 2015 10:11 am
by matteus
MrTamk1s wrote:
matteus wrote:How do I convert a u16 to a string?
There are a few SGDK compatible conversion methods in its string.h file (see the doxygen document). Namely, casting your u16 to a u32 and using the uintToStr() function should suffice
Thanks this is spot on! Exactly what I need! :)

Posted: Tue Aug 04, 2015 2:10 pm
by KanedaFr
and really easy to use :
sample