Created
September 9, 2014 13:59
-
-
Save lelinhtinh/1cc1f1ac7c2dcfc4e76e to your computer and use it in GitHub Desktop.
Chuyển mã nhị phân thành chuỗi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// http://www.midnight-coding.com/2014/05/convert-string-to-binary-to-string.html | |
function binaryToString(binValue) { | |
return binValue.replace(/[01]{8}/g, function (matchedString) { | |
return String.fromCharCode(parseInt(matchedString, 2)); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment