The removeTokens() method of p5.Table in p5.js is used to remove all the specified characters from values in the table. A specific column can be specified for removing the token from only that column. However, if no column is specified then the values of all the columns and rows in the table are processed.
removeTokens( chars, [column] )
Parameters: This function accepts two parameters as mentioned above and described below:
- chars: It is a String that specifies all the characters that have to be removed.
- column: It is a String or integer that specifies the column name or ID of the column to be trimmed. It is an optional parameter.
The example below illustrates the removeTokens() method in p5.js.
Online editor: https://editor.p5js.org/