Convert byte Array To String - Node.js String

Node.js examples for String:Base 64

Description

Convert byte Array To String

Demo Code

function byteArrayToString(byteArray){

    // Otherwise, fall back to 7-bit ASCII only
    var result = "";
    for (var i=0; i<byteArray.byteLength; i++){
        result += String.fromCharCode(byteArray[i])
    }/*from   w  ww . ja v a 2 s .  co  m*/
    return result;
}

Related Tutorials