Date: 09/30/98
- Next message: Andrey Zmievski: "Re: [PHP3] Suggestions for improvement"
- Previous message: Michael Schwarz: "[PHP3] Re: your mail"
- In reply to: Rich Clingman: "Re: [PHP3] A shl()/shr() function?"
- Next in thread: Mark Musone: "[PHP3] Sending mail attachments"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 30 Sep, Rich Clingman wrote:
> Thanks! I knew it was too simple.
>
> Now another question:
>
> How can I take a string of characters and turn them into a 4-byte integer
> (eg: "ABCD"--> 41424344x) so I can manipulate it bitwise?
>
> Rich Clingman
> inlan <email protected>
How about something like:
For each element in the string (you can treat the string as an array)
ord(string[element]) returns the ascii value
convert the ascii value to hex (if necessary)
concatenate the hex value to the new string you want to manipulate
end for
The exercise of coding this is left to the student ;-)
Cheers
-- David RobleyWEBMASTER | Phone +61 8 8374 0970 RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/ AusEinet | http://auseinet.flinders.edu.au/ Flinders University, ADELAIDE, SOUTH AUSTRALIA Visit the PHP mirror at http://au.php.net:81/
-- PHP 3 Mailing List http://www.php.net/ To unsubscribe send an empty message to php3-unsubscribe <email protected> To subscribe to the digest list: php3-digest-subscribe <email protected> For help: php3-help <email protected> Archive: http://www.php.net/mailsearch.php3
- Next message: Andrey Zmievski: "Re: [PHP3] Suggestions for improvement"
- Previous message: Michael Schwarz: "[PHP3] Re: your mail"
- In reply to: Rich Clingman: "Re: [PHP3] A shl()/shr() function?"
- Next in thread: Mark Musone: "[PHP3] Sending mail attachments"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

