WordPress at a glance
function is not described

Gettext_Translations::nplurals_and_expression_from_header() public WP 1.0

{} It's a method of the class: Gettext_Translations{}

No Hooks.

Return

Array. Null. Nothing.

Usage

$Gettext_Translations = new Gettext_Translations();
$Gettext_Translations->nplurals_and_expression_from_header( $header );
$header(string) (required)
-

Code of Gettext_Translations::nplurals_and_expression_from_header() WP 5.7

<?php
function nplurals_and_expression_from_header( $header ) {
	if ( preg_match( '/^\s*nplurals\s*=\s*(\d+)\s*;\s+plural\s*=\s*(.+)$/', $header, $matches ) ) {
		$nplurals   = (int) $matches[1];
		$expression = trim( $matches[2] );
		return array( $nplurals, $expression );
	} else {
		return array( 2, 'n != 1' );
	}
}