stripVersionSuffix function

String stripVersionSuffix(
  1. String activityType
)

Implementation

String stripVersionSuffix(String activityType) {
  // Matches: underscore + 'V' + digits at the very end of the string
  final versionSuffix = RegExp(r'_V\d+$');
  return activityType.replaceAll(versionSuffix, '');
}