* Convert text string to integer indices. * * @param {string} text Input text. * @returns {number[]} Indices of the characters of `text`.
(text)
| 166 | * @returns {number[]} Indices of the characters of `text`. |
| 167 | */ |
| 168 | textToIndices(text) { |
| 169 | const indices = []; |
| 170 | for (let i = 0; i < text.length; ++i) { |
| 171 | indices.push(this.charSet_.indexOf(text[i])); |
| 172 | } |
| 173 | return indices; |
| 174 | } |
| 175 | |
| 176 | /** |
| 177 | * Get a random slice of text data. |
no outgoing calls
no test coverage detected