matchesUcumConcept method

bool matchesUcumConcept(
  1. UcumConcept concept,
  2. String text,
  3. bool isRegex
)

Implementation

bool matchesUcumConcept(UcumConcept concept, String text, bool isRegex) {
  for (final String name in concept.names) {
    if (matches(name, text, isRegex)) {
      return true;
    }
  }
  return matches(concept.code, text, isRegex) ||
      matches(concept.codeUC, text, isRegex) ||
      matches(concept.printSymbol, text, isRegex);
}