private static function get_adjacent_chr( \DOMNode $node, $position, $length, callable $get_textnode ) {
		$textnode = $get_textnode( $node );

		if ( isset( $textnode ) && isset( $textnode->data ) ) {
			// Determine encoding.
			$func = Strings::functions( $textnode->data );

			if ( ! empty( $func ) ) {
				return \preg_replace( '/\p{C}/Su', '', $func['substr']( $textnode->data, $position, $length ) );
			}
		}

		return '';
	}
private static function get_adjacent_chr( \DOMNode $node, $position, $length, callable $get_textnode ) {
		$textnode = $get_textnode( $node );

		if ( isset( $textnode ) && isset( $textnode->data ) ) {
			// Determine encoding.
			$func = Strings::functions( $textnode->data );

			if ( ! empty( $func ) ) {
				return \preg_replace( '/\p{C}/Su', '', $func['substr']( $textnode->data, $position, $length ) );
			}
		}

		return '';
	}
private static function get_adjacent_chr ( \ DOMNode $ node , $ position , $ length , callable $ get_textnode ) { $ textnode = $ get_textnode ( $ node ) ; if ( isset ( $ textnode ) && isset ( $ textnode -> data ) ) { // Determine encoding. $ func = Strings :: functions ( $ textnode -> data ) ; if ( ! empty ( $ func ) ) { return \ preg_replace ( '/\p{C}/Su' , '' , $ func [ 'substr' ] ( $ textnode -> data , $ position , $ length ) ) ; } } return '' ; }
Retrieves a character from the given \DOMNode.

@since 5.0.0

@param  \DOMNode $node         Required.
@param  int      $position     The position parameter for `substr`.
@param  int      $length       The length parameter for `substr`.
@param  callable $get_textnode A function to retrieve the \DOMText from the node.

@return string The character or an empty string.
Retrieves a character from the given \ DOMNode .