This content has been marked as final. Show 5 replies
myString = "00000000" + myOldString;
myRightLengthString = myString.subString(myString.length()-8);
Prepend zeros if the length of the String is less than 8. You can do this with either string concatenation or by using a StringBuffer.
thanks... anyway just to double confirm.. adding 0 infront will not change the value of the binary right?
are the same in all number bases that I can think of off the top of my head.
Thanks all for the help...