diff --git a/src/NodaUncertaintyHelper.php b/src/NodaUncertaintyHelper.php index aa0d2c8..4ded99d 100644 --- a/src/NodaUncertaintyHelper.php +++ b/src/NodaUncertaintyHelper.php @@ -116,6 +116,8 @@ final class NodaUncertaintyHelper { */ public static function cleanUncertaintyIndicatorsPlace(string $ort_name):string { + $ort_name = \trim($ort_name); + // Remove uncertainty prefixes foreach (NodaUncertaintyHelper::PLACE_UNCERTAINTY_PREFIXES as $prefix) { if (\substr($ort_name, 0, \strlen($prefix)) === "$prefix") { @@ -172,6 +174,8 @@ final class NodaUncertaintyHelper { */ public static function cleanUncertaintyIndicatorsPersinst(string $value):string { + $value = \trim($value); + foreach (self::PERSINST_UNCERTAINTY_PREFIXES as $toRemove) { if (\mb_substr($value, 0, \mb_strlen($toRemove)) === $toRemove) { $value = substr($value, \mb_strlen($toRemove));