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