|
-
Dec 5th, 2007, 09:20 AM
#1
Thread Starter
Member
[RESOLVED] Converting a long to a bit string
Hi. I've got to access a set of user permissions. There are 32 possible permissions that can be either true or false. The function that gets the permissions returns a long. Each bit in that long (from 0-31) represents one of the options. What I'd like to do is convert that long to a string of 1's and 0's.
For example, if the number came back as 32 I'd like to convert it to
"00000000 00000000 00000000 00010000"
Thanks.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|