Navigation

Operators and Keywords

Function List:

C++ API

: text = get_first_help_sentence (name)
: text = get_first_help_sentence (name, max_len)
: [text, status] = get_first_help_sentence (…)

Return the first sentence of a function’s help text.

The first sentence is defined as the text after the function declaration until either the first period (".") or the first appearance of two consecutive newlines ("\n\n"). The text is truncated to a maximum length of max_len, which defaults to 80.

The optional output argument status returns the status reported by makeinfo. If only one output argument is requested, and status is nonzero, a warning is displayed.

As an example, the first sentence of this help text is

get_first_help_sentence ("get_first_help_sentence")
-| ans = Return the first sentence of a function's help text.

Package: octave