You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
613 B
C++

// SPDX-License-Identifier: GPL-2.0-or-later
// Copyright The Music Player Daemon Project
#pragma once
#include "lib/icu/Features.h" // for HAVE_ICU
#ifdef HAVE_ICU
#define HAVE_ICU_CANONICALIZE
#include <string_view>
class AllocatedString;
/**
* Throws on error.
*/
void
IcuCanonicalizeInit();
void
IcuCanonicalizeFinish() noexcept;
/**
* Transform the given string to "canonical" form to allow fuzzy
* string comparisons. The full set of features (if ICU is being
* used):
*
* - case folding (optional)
*/
AllocatedString
IcuCanonicalize(std::string_view src, bool fold_case) noexcept;
#endif