lengthDistance method

int lengthDistance(
  1. String other
)

Returns the absolute value of the difference in length between two terms.

The String and other are trimmed for the calculation.

Implementation

int lengthDistance(String other) =>
    (trim().length - other.trim().length).abs();