Display or retrieve the current post title with optional content.

Signature

the_title( $before = '', $after = '', $echo = true )
before
 (string) Optional. Content to prepend to the title.
Default: ''
after
 (string) Optional. Content to append to the title.
Default: ''
echo
 (boolean) Optional, default to true.Whether to display or return.
Default: true

Return

(null|string) Null on no title. String if $echo parameter is false.

Source

function the_title($before = '', $after = '', $echo = true) {
	$title = get_the_title();

	if ( strlen($title) == 0 )
		return;

	$title = $before . $title . $after;

	if ( $echo )
		echo $title;
	else
		return $title;
}
WP Trac GitHub

Link here