Automattic\WooCommerce\Internal\Admin\Settings

SettingsUISchema::decimal_strings_represent_same_value │ private static │ WC 1.0

Whether two decimal strings represent the same normalized value.

Method of the class: SettingsUISchema{}

No Hooks.

Returns

bool.

Usage

$result = SettingsUISchema::decimal_strings_represent_same_value( $left, $right ): bool;
$left(string) (required)
Left decimal value.
$right(string) (required)
Right decimal value.

SettingsUISchema::decimal_strings_represent_same_value() code WC 11.2.1

private static function decimal_strings_represent_same_value( string $left, string $right ): bool {
	$normalized_left  = self::normalize_decimal_string( $left );
	$normalized_right = self::normalize_decimal_string( $right );

	return null !== $normalized_left && $normalized_left === $normalized_right;
}