deduplicateGroupEntryName function

  1. @internal
String deduplicateGroupEntryName(
  1. String parentName,
  2. String currentName
)

Allows for retrieving the name of a GroupEntry by stripping the names of all ancestor groups.

Example: parentName = 'example_test myGroup' currentName = 'example_test myGroup myTest' should return 'myTest'

Implementation

@internal
String deduplicateGroupEntryName(String parentName, String currentName) {
  return currentName.substring(
    parentName.length + 1,
    currentName.length,
  );
}