removeEndingZ function

String removeEndingZ(
  1. String value
)

Removes the last character if it is Z

Implementation

String removeEndingZ(String value) {
  return value.endsWith('Z') ? value.substring(0, value.length) : value;
}