tryParse static method

Namefully? tryParse(
  1. String text
)

Constructs a Namefully instance from a text.

It works like parse except that this function returns null where parse would throw a NameException.

Implementation

static Namefully? tryParse(String text) {
  try {
    return Namefully.fromParser(Parser.build(text));
  } on NameException {
    return null;
  }
}