static function cleanUp( $string ) {
		if ( NORMALIZE_INTL ) {
			$string = self::replaceForNativeNormalize( $string );
			$norm = normalizer_normalize( $string, Normalizer::FORM_C );
			if ( $norm === null || $norm === false ) {
				# normalizer_normalize will either return false or null
				# (depending on which doc you read) if invalid utf8 string.
				# quickIsNFCVerify cleans up invalid sequences.

				if ( self::quickIsNFCVerify( $string ) ) {
					# if that's true, the string is actually already normal.
					return $string;
				} else {
					# Now we are valid but non-normal
					return normalizer_normalize( $string, Normalizer::FORM_C );
				}
			} else {
				return $norm;
			}
		} elseif ( self::quickIsNFCVerify( $string ) ) {
			# Side effect -- $string has had UTF-8 errors cleaned up.
			return $string;
		} else {
			return self::NFC( $string );
		}
	}
static function cleanUp( $string ) {
		if ( NORMALIZE_INTL ) {
			$string = self::replaceForNativeNormalize( $string );
			$norm = normalizer_normalize( $string, Normalizer::FORM_C );
			if ( $norm === null || $norm === false ) {
				# normalizer_normalize will either return false or null
				# (depending on which doc you read) if invalid utf8 string.
				# quickIsNFCVerify cleans up invalid sequences.

				if ( self::quickIsNFCVerify( $string ) ) {
					# if that's true, the string is actually already normal.
					return $string;
				} else {
					# Now we are valid but non-normal
					return normalizer_normalize( $string, Normalizer::FORM_C );
				}
			} else {
				return $norm;
			}
		} elseif ( self::quickIsNFCVerify( $string ) ) {
			# Side effect -- $string has had UTF-8 errors cleaned up.
			return $string;
		} else {
			return self::NFC( $string );
		}
	}
static function cleanUp ( $ string ) { if ( NORMALIZE_INTL ) { $ string = self :: replaceForNativeNormalize ( $ string ) ; $ norm = normalizer_normalize ( $ string , Normalizer :: FORM_C ) ; if ( $ norm === null || $ norm === false ) { # normalizer_normalize will either return false or null # (depending on which doc you read) if invalid utf8 string. # quickIsNFCVerify cleans up invalid sequences. if ( self :: quickIsNFCVerify ( $ string ) ) { # if that's true, the string is actually already normal. return $ string ; } else { # Now we are valid but non-normal return normalizer_normalize ( $ string , Normalizer :: FORM_C ) ; } } else { return $ norm ; } } elseif ( self :: quickIsNFCVerify ( $ string ) ) { # Side effect -- $string has had UTF-8 errors cleaned up. return $ string ; } else { return self :: NFC ( $ string ) ; } }
The ultimate convenience function! Clean up invalid UTF-8 sequences,
and convert to normal form C, canonical composition.

Fast return for pure ASCII strings; some lesser optimizations for
strings containing only known-good characters. Not as fast as toNFC().

@param string $string a UTF-8 string
@return string a clean, shiny, normalized UTF-8 string
The ultimate convenience function! Clean up invalid UTF - 8 sequences and convert to normal form C canonical composition .