lib/string-array-view.js
/**
   * Creates an array view from a given array of strings.
   *
   * @param {ArrayLike<string>} value an array of strings to store in the new array view
   * @param {number} stringLength the maximum length of a string
   * @param {StringArrayView} [array] an existing StringArrayView to populate with given strings
   * @returns {StringArrayView}
   */
Creates an array view from a given array of strings.
@param {ArrayLike} value an array of strings to store in the new array view
@param {number} stringLength the maximum length of a string
@param {StringArrayView} [array] an existing StringArrayView to populate with given strings
@returns {StringArrayView}
Creates an array view from a given array of strings . @param { ArrayLike } value an array of strings to store in the new array view @param { number } stringLength the maximum length of a string @param { StringArrayView } [ array ] an existing StringArrayView to populate with given strings @returns { StringArrayView }
static from(value, stringLength, array) {
    const view = array || this.of(value.length, stringLength);
    const { size } = view;
    for (let i = 0; i < size; i++) {
      const string = StringView.fromString(value[i], stringLength);
      view.bytes.set(string, i * stringLength);
    }
    return view;
  }
static from ( value , stringLength , array ) { const view = array || this . of ( value . length , stringLength ) ; const { size } = view ; for ( let i = 0 ; i < size ; i ++ ) { const string = StringView . fromString ( value [ i ] , stringLength ) ; view . bytes . set ( string , i * stringLength ) ; } return view ; }
Creates an array view from a given array of strings.
Creates an array view from a given array of strings .