fnStoredCharLength function

dynamic fnStoredCharLength(
  1. dynamic value
)

StoredCharLength(str): the effective length after trimming trailing whitespace

Implementation

dynamic fnStoredCharLength(dynamic value) {
  final s = varToStr(value);
  var end = s.length;
  while (end > 0 && s[end - 1] == ' ') end--;
  return end;
}