getOrganizationIdFromUrn function

String getOrganizationIdFromUrn(
  1. String organizationUrn
)

Implementation

String getOrganizationIdFromUrn(String organizationUrn) {
  if (!organizationUrn.startsWith(organizationUrnPrefix)) {
    throw ArgumentError('Invalid organization URN.');
  }

  return organizationUrn.substring(organizationUrnPrefix.length);
}