]> git.saurik.com Git - apple/icu.git/blame_incremental - icuSources/samples/numfmt/util.h
ICU-66108.tar.gz
[apple/icu.git] / icuSources / samples / numfmt / util.h
... / ...
CommitLineData
1/********************************************************************
2 * © 2016 and later: Unicode, Inc. and others.
3 * License & terms of use: http://www.unicode.org/copyright.html#License
4 *************************************************************************
5 *************************************************************************
6 * COPYRIGHT:
7 * Copyright (c) 1999-2002, International Business Machines Corporation and
8 * others. All Rights Reserved.
9 *************************************************************************/
10
11#include "unicode/unistr.h"
12#include "unicode/fmtable.h"
13
14using namespace icu;
15
16#ifndef UPRV_LENGTHOF
17#define UPRV_LENGTHOF(array) (int32_t)(sizeof(array)/sizeof((array)[0]))
18#endif
19
20// Verify that a UErrorCode is successful; exit(1) if not
21void check(UErrorCode& status, const char* msg);
22
23// Replace nonprintable characters with unicode escapes
24UnicodeString escape(const UnicodeString &source);
25
26// Print the given string to stdout
27void uprintf(const UnicodeString &str);
28
29// Create a display string for a formattable
30UnicodeString formattableToString(const Formattable& f);