B2G/gecko/dom/system/gonk/RadioInterfaceLayer.js
/**
   * Fragment UCS2 encodable string for transmission.
   *
   * @param text
   *        text string to be fragmented.
   * @param segmentChars
   *        Number of available characters per segment.
   *
   * @return an array of objects. See #_fragmentText() for detailed definition.
   */
Fragment UCS2 encodable string for transmission.
@param text
text string to be fragmented.
@param segmentChars
Number of available characters per segment.

@return an array of objects. See #_fragmentText() for detailed definition.
Fragment UCS2 encodable string for transmission . @param text text string to be fragmented . @param segmentChars Number of available characters per segment . @return an array of objects . See #_fragmentText () for detailed definition .
function _fragmentTextUCS2(text, segmentChars) {
    let ret = [];
    for (let offset = 0; offset < text.length; offset += segmentChars) {
      let str = text.substr(offset, segmentChars);
      ret.push({
        body: str,
        encodedBodyLength: str.length * 2,
      });
    }
    return ret;
  }
function _fragmentTextUCS2 ( text , segmentChars ) { let ret = [ ] ; for ( let offset = 0 ; offset < text . length ; offset += segmentChars ) { let str = text . substr ( offset , segmentChars ) ; ret . push ( { body : str , encodedBodyLength : str . length * 2 , } ) ; } return ret ; }
Fragment UCS2 encodable string for transmission.
Fragment UCS2 encodable string for transmission .