ValueOrNull method

Pointer<Char> ValueOrNull([
  1. String? text,
  2. String? key
])

Writes text into slot using Value and returns its pointer, or returns nullptr if text is null.

Use this instead of Value when the C API uses a null pointer to signal "no value".

Implementation

Pointer<Char> ValueOrNull([String? text, String? key])
  => text == null ? nullptr : Value(text, key);