toInitials method

String toInitials()

Implementation

String toInitials() => isNotEmpty
    ? trim().split(RegExp(' +')).map((s) => s[0]).take(2).join()
    : this;