ndef-lib/ndef-text.js
function decode(data) {

    var languageCodeLength = (data[0] & 0x3F), // 6 LSBs
        languageCode = data.slice(1, 1 + languageCodeLength),
        utf16 = (data[0] & 0x80) !== 0; // assuming UTF-16BE

    // TODO need to deal with UTF in the future
    // console.log("lang " + languageCode + (utf16 ? " utf16" : " utf8"));

    return util.bytesToString(data.slice(languageCodeLength + 1));
}
function decode(data) {

    var languageCodeLength = (data[0] & 0x3F), // 6 LSBs
        languageCode = data.slice(1, 1 + languageCodeLength),
        utf16 = (data[0] & 0x80) !== 0; // assuming UTF-16BE

    // TODO need to deal with UTF in the future
    // console.log("lang " + languageCode + (utf16 ? " utf16" : " utf8"));

    return util.bytesToString(data.slice(languageCodeLength + 1));
}
function decode ( data ) { var languageCodeLength = ( data [ 0 ] & 0x3F ) , // 6 LSBs languageCode = data . slice ( 1 , 1 + languageCodeLength ) , utf16 = ( data [ 0 ] & 0x80 ) !== 0 ; // assuming UTF-16BE // TODO need to deal with UTF in the future // console.log("lang " + languageCode + (utf16 ? " utf16" : " utf8")); return util . bytesToString ( data . slice ( languageCodeLength + 1 ) ) ; }
decode text bytes from ndef record payload @returns a string
decode text bytes from ndef record payload