At the top left of the script editor, click “search help” and type the method. A list with all the methods from any class with a method with such a name will appear so just click the relevant one and you will be given a description of what the method does and the arguments it requires.
In case of “erase” there’s a lot coming up - selecting the one under “String” leads to this then:
void erase(position: int, chars: int)
Erases chars characters from the string starting from position.
I guess it’s a good idea to practice search-help a bit indeed…
Thank you!