I need some help dealing with strings. I want to be able to take a string and extract the letters as an ascii byte sequence, four at a time, and make the byte sequence an int... that is, the leftmost letter as a byte occupies bits 31-23, the second letter as a byte occupies bits 23-15 etc.
I tried creating a bank, making a bank stream and using readint from the stream, but that seems horribly inefficient. Can someone direct me as to a far better and more direct method, preferably without bit shifts and without messing with arrays? Not that I am against any method that may use bit shifts or arrays, but I was just hoping there was a slicing and recasting method I am overlooking, or something like that.
I tried creating a bank, making a bank stream and using readint from the stream, but that seems horribly inefficient. Can someone direct me as to a far better and more direct method, preferably without bit shifts and without messing with arrays? Not that I am against any method that may use bit shifts or arrays, but I was just hoping there was a slicing and recasting method I am overlooking, or something like that.