WordPress at a glance
function is not described

Automattic\Jetpack\Autoloader\jpfd0d177b2d8140b4b20d4474b07b8ed7

Path_Processor::tokenize_path_constants() public WC 1.0

Given a path this will replace any of the path constants with a token to represent it.

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

No Hooks.

Return

String. The tokenized path.

Usage

$Path_Processor = new Path_Processor();
$Path_Processor->tokenize_path_constants( $path );
$path(string) (required)
The path we want to process.

Code of Path_Processor::tokenize_path_constants() WC 5.3.0

<?php
public function tokenize_path_constants( $path ) {
	$path = wp_normalize_path( $path );

	$constants = $this->get_normalized_constants();
	foreach ( $constants as $constant => $constant_path ) {
		$len = strlen( $constant_path );
		if ( substr( $path, 0, $len ) !== $constant_path ) {
			continue;
		}

		return substr_replace( $path, '{{' . $constant . '}}', 0, $len );
	}

	return $path;
}