Method code for $english_lib.get_noun()

[Turn off line numbering]
  1: arg spec, @plural;
  2: var i, vb;
  3: 
  4: i = "/" in spec + "/";
  5: if (plural && plural[1]) {
  6:     if (i < spec.length())
  7:         vb = spec.subrange(i + 1);
  8:     else
  9:         vb = ._noun_plural(spec);
 10: } else if (i > 1) {
 11:     vb = spec.subrange(1, i - 1);
 12: } else {
 13:     vb = ._noun_singular(spec.subrange(2));
 14: }
 15: 
 16: // just pass to $string.capitalize()?
 17: if (strcmp("a", i == 1 ? spec[2] : spec) > 0)
 18:     return vb.capitalize();
 19: else
 20:     return vb;

// Created 11-Nov-1996 as a part of ColdCore, see: @help Credit

Tlon