`currentValue.setLength(0);` is an alternative