Method code for $user_db<$registry>.search()

[Turn off line numbering]
  1: arg name;
  2: var tmp;
  3: 
  4: name = .strip_key(name);
  5: name || throw(~namenf, "No matches found.");
  6: tmp = (| .exact_match(name) |);
  7: if (tmp)
  8:     return tmp;
  9: catch any {
 10:     tmp = (> .match_begin(name) <);
 11: } with {
 12:     switch (error()) {
 13:         case ~ambig:
 14:             rethrow(error());
 15:         default:
 16:             throw(~namenf, "No matches found.");
 17:     }
 18: }
 19: return tmp;

// Created 27-Mar-1995 as a part of ColdCore, see: @help Credit

Tlon