setLength method
Implementation
void setLength(int length) {
if (length > this.length) {
writeAll(List.filled(length - this.length, '\x00'));
} else {
delete(length, this.length);
}
}
void setLength(int length) {
if (length > this.length) {
writeAll(List.filled(length - this.length, '\x00'));
} else {
delete(length, this.length);
}
}