code: function stringIterator(str) {
    let index = 0;
    return {
      next() {
        return index < bmpLength(str)
          ? {
              value: bmpCharAt(str, index++),
              done: false
            }
          : {
              done: true
            };
      }
    };
  }
docs: Creates an iterator over strings. ES2015 strings already satisfy the iterator protocol, so this function will not
  be used for them. This is for ES5 strings where the iterator protocol doesn't exist. As with ES2015 iterators, it
  takes into account double-width BMP characters and will return the entire character as a two-character string.
  
  @private
  
  @param {string} str The string to be iterated over.@author [author]
  @return {module:xduce~iterator} An iterator that returns one character per call to `next`.