src/utils/bot-utils.js
/**
   * Gets the first index where the given substring exists and not quoted.
   * @param  {string} text      the text to search in
   * @param  {string} substring the text to find, results for the quotes themselves are undefined
   * @return {number}           the index of the first non-quoted place with the string
   */
Gets the first index where the given substring exists and not quoted.
@param  {string} text      the text to search in
@param  {string} substring the text to find, results for the quotes themselves are undefined
@return {number}           the index of the first non-quoted place with the string
Gets the first index where the given substring exists and not quoted . @param { string } text the text to search in @param { string } substring the text to find results for the quotes themselves are undefined @return { number } the index of the first non - quoted place with the string
static findFirstNonQuotedIndex(text, substring) {
    const indices = Utils.getIndices(text, substring);
    for (const element of indices) {
      if (!Utils.isPlaceQuoted(text, element)) {
        return element;
      }
    }
    return -1;
  }
static findFirstNonQuotedIndex ( text , substring ) { const indices = Utils . getIndices ( text , substring ) ; for ( const element of indices ) { if ( ! Utils . isPlaceQuoted ( text , element ) ) { return element ; } } return - 1 ; }
Gets the first index where the given substring exists and not quoted.
Gets the first index where the given substring exists and not quoted .