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) {
      for (let i = 0; i < str.length; i++) {
        Text.encode(data, str.charAt(i));
      }
    }
    Octet.encode(data, 0);
  }
function encode ( data , str ) { if ( str ) { for ( let i = 0 ; i < str . length ; i ++ ) { Text . encode ( data , str . charAt ( i ) ) ; } } Octet . encode ( data , 0 ) ; }
@param data
        A wrapped object to store encoded raw data.
@param data A wrapped object to store encoded raw data .