Add files via upload

This commit is contained in:
zsyg
2025-07-20 13:25:35 +08:00
committed by GitHub
parent a93e4d67f4
commit 104aba01da
5 changed files with 16 additions and 46 deletions

View File

@@ -11,7 +11,7 @@ std::string BinaryConverter::convert(const std::string& input) {
std::stringstream result;
for (char c : input) {
std::string binary = std::bitset<8>(c).to_string();
// 去除前导0保留后6位
// 去除前导0,保留后6位
size_t firstOne = binary.find('1');
if (firstOne != std::string::npos) {
binary = binary.substr(firstOne);