cockpitTargetRefMatches function

bool cockpitTargetRefMatches(
  1. String registrationId,
  2. String ref
)

Whether ref identifies registrationId by token prefix.

Implementation

bool cockpitTargetRefMatches(String registrationId, String ref) {
  final normalized = ref.trim().toLowerCase();
  return normalized.length >= cockpitTargetRefMinimumLength &&
      cockpitTargetRefToken(registrationId).startsWith(normalized);
}