+#include "unicode/ustring.h"
+#include "cmemory.h"
+#include "ustr_imp.h"
+
+static int32_t U_CALLCONV
+unistr_case_internalToTitle(const UCaseMap *csm,
+ UChar *dest, int32_t destCapacity,
+ const UChar *src, int32_t srcLength,
+ UErrorCode *pErrorCode) {
+ ubrk_setText(csm->iter, src, srcLength, pErrorCode);
+ return ustrcase_internalToTitle(csm, dest, destCapacity, src, srcLength, pErrorCode);
+}
+
+/*
+ * Set parameters on an empty UCaseMap, for UCaseMap-less API functions.
+ * Do this fast because it is called with every function call.
+ */
+static inline void
+setTempCaseMap(UCaseMap *csm, const char *locale) {
+ if(csm->csp==NULL) {
+ csm->csp=ucase_getSingleton();
+ }
+ if(locale!=NULL && locale[0]==0) {
+ csm->locale[0]=0;
+ } else {
+ ustrcase_setTempCaseMapLocale(csm, locale);
+ }
+}