protected static function convert_hyphenation_exception_to_pattern( $exception ) {
		$f = Strings::functions( $exception );
		if ( empty( $f ) ) {
			return null; // unknown encoding, abort.
		}

		// Set the word_pattern - this method keeps any contextually important capitalization.
		$lowercase_hyphened_word_parts  = $f['str_split']( $exception, 1 );
		$lowercase_hyphened_word_length = $f['strlen']( $exception );

		$word_pattern = [];
		$index        = 0;

		for ( $i = 0; $i < $lowercase_hyphened_word_length; $i++ ) {
			if ( '-' === $lowercase_hyphened_word_parts[ $i ] ) {
				$word_pattern[ $index ] = 9;
			} else {
				$index++;
			}
		}

		return $word_pattern;
	}
protected static function convert_hyphenation_exception_to_pattern( $exception ) {
		$f = Strings::functions( $exception );
		if ( empty( $f ) ) {
			return null; // unknown encoding, abort.
		}

		// Set the word_pattern - this method keeps any contextually important capitalization.
		$lowercase_hyphened_word_parts  = $f['str_split']( $exception, 1 );
		$lowercase_hyphened_word_length = $f['strlen']( $exception );

		$word_pattern = [];
		$index        = 0;

		for ( $i = 0; $i < $lowercase_hyphened_word_length; $i++ ) {
			if ( '-' === $lowercase_hyphened_word_parts[ $i ] ) {
				$word_pattern[ $index ] = 9;
			} else {
				$index++;
			}
		}

		return $word_pattern;
	}
protected static function convert_hyphenation_exception_to_pattern ( $ exception ) { $ f = Strings :: functions ( $ exception ) ; if ( empty ( $ f ) ) { return null ; // unknown encoding, abort. } // Set the word_pattern - this method keeps any contextually important capitalization. $ lowercase_hyphened_word_parts = $ f [ 'str_split' ] ( $ exception , 1 ) ; $ lowercase_hyphened_word_length = $ f [ 'strlen' ] ( $ exception ) ; $ word_pattern = [ ] ; $ index = 0 ; for ( $ i = 0 ; $ i < $ lowercase_hyphened_word_length ; $ i ++ ) { if ( '-' === $ lowercase_hyphened_word_parts [ $ i ] ) { $ word_pattern [ $ index ] = 9 ; } else { $ index ++ ; } } return $ word_pattern ; }
Generates a hyphenation pattern from an exception.

@param string $exception A hyphenation exception in the form "foo-bar". Needs to be encoded in ASCII or UTF-8.

@return array|null Returns the hyphenation pattern or null if `$exception` is using an invalid encoding.
Generates a hyphenation pattern from an exception .