mergeNsAndName function

String mergeNsAndName(
  1. String? prefix,
  2. String localName
)

Implementation

String mergeNsAndName(String? prefix, String localName) {
  if (prefix == null) return localName;
  // At least one part is empty, this is not a valid namespaced token.
  if (prefix == '' || localName == '') return '$prefix:$localName';
  return '@$prefix:$localName';
}