lastChar method

String? lastChar()

Returns the last character of the string, or null if empty.

Implementation

String? lastChar() {
	if (this.isEmpty) {
		return null;
	}
	return this[this.length - 1];
}