How to display Hexa decimal number with space delimiter

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

sudhakar
Just popping in
Just popping in
Posts: 17
Joined: Wed Dec 21, 2011 16:46

How to display Hexa decimal number with space delimiter

Postby sudhakar » Fri Feb 07, 2014 13:48

Hi All,

Could you please let me know how to display a Hexa decimal number with space delimiter in CEGUI Edit Box using C++.

in a format as in the example below with spaces after 4 bytes)

0x0000 0000 0000 0000
But for calculation purpose the entire string should be considered as a single value.

Appreciate your help.

Thanks,
Sudhakar

User avatar
Ident
CEGUI Team
Posts: 1998
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: How to display Hexa decimal number with space delimiter

Postby Ident » Fri Feb 07, 2014 15:15

But for calculation purpose the entire string should be considered as a single value.

This is not possible. A string is an array of characters and not a single value.

Make a manual conversion function that transforms a hexadecimal string into a hexadecimal int (or long, or whatever) and vice-versa and use that to transform the value whenever needed.
CrazyEddie: "I don't like GUIs"


Return to “Help”

Who is online

Users browsing this forum: No registered users and 27 guests