formattingRuleHasFirstGroupOnly static method

bool formattingRuleHasFirstGroupOnly(
  1. String nationalPrefixFormattingRule
)

Helper function to check if the national prefix formatting rule has the first group only, i.e., does not start with the national prefix.

nationalPrefixFormattingRule The formatting rule for the national prefix.

Implementation

static bool formattingRuleHasFirstGroupOnly(
    String nationalPrefixFormattingRule) {
  return nationalPrefixFormattingRule.isEmpty ||
      _firstGroupOnlyPrefixPattern.hasMatch(nationalPrefixFormattingRule);
}