Actually, I'm not asking how to implement this functionality myself. I know it wouldn't be very complicated. I just don't want to reinvent the wheel, so I was wondering if this functionality exists somewhere in the BCL. It seems like surely it's there somewhere...
Example input/desired output:
Input Output 1 1 2 10 3 11 4 100 10 1010