Converting string of 1s and 0s into binary value

前端 未结 6 925
梦如初夏
梦如初夏 2020-11-27 07:06

I\'m trying to convert an incoming sting of 1s and 0s from stdin into their respective binary values (where a string such as \"11110111\" would be converted to 0xF7). This s

6条回答
  •  孤城傲影
    2020-11-27 07:46

    I've wrote a few functions for this and licensed under LGPL. Can be found here.

提交回复
热议问题