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 » Mon Aug 03, 2015 1:26 pm

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 » Mon Aug 03, 2015 2:37 pm

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 » Tue Aug 04, 2015 10:11 am

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: 1139
Joined: Tue Aug 29, 2006 10:56 am
Contact:

Post by KanedaFr » Tue Aug 04, 2015 2:10 pm

and really easy to use :
sample

Post Reply