B2G/gecko/dom/mobilemessage/src/ril/WspPduHelper.jsm
/**
   * @param data
   *        A wrapped object to store encoded raw data.
   * @param str
   *        A String to be encoded.
   */
@param data
A wrapped object to store encoded raw data.
@param str
A String to be encoded.
@param data A wrapped object to store encoded raw data . @param str A String to be encoded .
function encode(data, str) {
    if (!str) {
      Octet.encode(data, 0);
      return;
    }
    let firstCharCode = str.charCodeAt(0);
    if (firstCharCode >= 128) {
      Octet.encode(data, 127);
    }
    NullTerminatedTexts.encode(data, str);
  }
function encode ( data , str ) { if ( ! str ) { Octet . encode ( data , 0 ) ; return ; } let firstCharCode = str . charCodeAt ( 0 ) ; if ( firstCharCode >= 128 ) { Octet . encode ( data , 127 ) ; } NullTerminatedTexts . encode ( data , str ) ; }
@param data
        A wrapped object to store encoded raw data.
@param data A wrapped object to store encoded raw data .