SGDK How do I convert a u16 to a string?

SGDK only sub forum

Moderator: Stef

Post Reply
matteus
Very interested
Posts: 336
Joined: Mon Feb 04, 2008 1:41 pm

SGDK How do I convert a u16 to a string?

Post by matteus »

How do I convert a u16 to a string?
MrTamk1s
Very interested
Posts: 75
Joined: Sun Jan 04, 2015 10:27 pm
Location: Pennsylvania
Contact:

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

Post 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
SGDK homebrew dev and Unity3D Indie dev.
Sega does what Nintendont!
matteus
Very interested
Posts: 336
Joined: Mon Feb 04, 2008 1:41 pm

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

Post 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! :)
KanedaFr
Administrateur
Posts: 1154
Joined: Tue Aug 29, 2006 10:56 am
Contact:

Post by KanedaFr »

and really easy to use :
sample
Post Reply