netlog_viewer/netlog_viewer/log_view_painter.js
function tryParseHexToBytes(hexStr) {
    if ((hexStr.length % 2) !== 0) {
      return null;
    }

    const result = [];
    for (let i = 0; i < hexStr.length; i += 2) {
      const value = parseInt(hexStr.substr(i, 2), 16);
      if (isNaN(value)) {
        return null;
      }
      result.push(value);
    }

    return result;
  }
function tryParseHexToBytes(hexStr) {
    if ((hexStr.length % 2) !== 0) {
      return null;
    }

    const result = [];
    for (let i = 0; i < hexStr.length; i += 2) {
      const value = parseInt(hexStr.substr(i, 2), 16);
      if (isNaN(value)) {
        return null;
      }
      result.push(value);
    }

    return result;
  }
function tryParseHexToBytes ( hexStr ) { if ( ( hexStr . length % 2 ) !== 0 ) { return null ; } const result = [ ] ; for ( let i = 0 ; i < hexStr . length ; i += 2 ) { const value = parseInt ( hexStr . substr ( i , 2 ) , 16 ) ; if ( isNaN ( value ) ) { return null ; } result . push ( value ) ; } return result ; }
Parses |hexStr| to an array of bytes, or returns null if the input is not a
valid hex string.
Parses |hexStr| to an array of bytes or returns null if the input is not a valid hex string .