B2G/gecko/dom/system/gonk/RadioInterfaceLayer.js
/**
   * Calculate user data length and its encoding.
   *
   * @param message
   *        a message string to be encoded.
   * @param strict7BitEncoding
   *        Optional. Enable Latin characters replacement with corresponding
   *        ones in GSM SMS 7-bit default alphabet.
   *
   * @return an options object with some or all of following attributes set:
   *
   * @param dcs
   *        Data coding scheme. One of the PDU_DCS_MSG_CODING_*BITS_ALPHABET
   *        constants.
   * @param userDataHeaderLength
   *        Length of embedded user data header, in bytes. The whole header
   *        size will be userDataHeaderLength + 1; 0 for no header.
   * @param encodedFullBodyLength
   *        Length of the message body when encoded with the given DCS. For
   *        UCS2, in bytes; for 7-bit, in septets.
   * @param langIndex
   *        Table index used for normal 7-bit encoded character lookup.
   * @param langShiftIndex
   *        Table index used for escaped 7-bit encoded character lookup.
   * @param segmentMaxSeq
   *        Max sequence number of a multi-part messages, or 1 for single one.
   *        This number might not be accurate for a multi-part message until
   *        it's processed by #_fragmentText() again.
   */
Calculate user data length and its encoding.
@param message
a message string to be encoded.

@return an options object with some or all of following attributes set.

@param dcs
Data coding scheme.
Calculate user data length and its encoding . @param message a message string to be encoded . @return an options object with some or all of following attributes set . @param dcs Data coding scheme .
function _calculateUserDataLength(message, strict7BitEncoding) {
    let options = this._calculateUserDataLength7Bit(message, strict7BitEncoding);
    if (!options) {
      options = this._calculateUserDataLengthUCS2(message);
    }
    debug("_calculateUserDataLength: " + JSON.stringify(options));
    return options;
  }
function _calculateUserDataLength ( message , strict7BitEncoding ) { let options = this . _calculateUserDataLength7Bit ( message , strict7BitEncoding ) ; if ( ! options ) { options = this . _calculateUserDataLengthUCS2 ( message ) ; } debug ( "_calculateUserDataLength: " + JSON . stringify ( options ) ) ; return options ; }
Calculate user data length and its encoding.
Calculate user data length and its encoding .