1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/intl/icu/source/tools/toolutil/dbgutil.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,43 @@ 1.4 + 1.5 +/* 1.6 +************************************************************************ 1.7 +* Copyright (c) 2007-2012, International Business Machines 1.8 +* Corporation and others. All Rights Reserved. 1.9 +************************************************************************ 1.10 +*/ 1.11 + 1.12 +/** C++ Utilities to aid in debugging **/ 1.13 + 1.14 +#ifndef _DBGUTIL_H 1.15 +#define _DBGUTIL_H 1.16 + 1.17 +#include "unicode/utypes.h" 1.18 +#include "udbgutil.h" 1.19 +#include "unicode/unistr.h" 1.20 + 1.21 +#if !UCONFIG_NO_FORMATTING 1.22 + 1.23 +U_TOOLUTIL_API const icu::UnicodeString& U_EXPORT2 1.24 +udbg_enumString(UDebugEnumType type, int32_t field); 1.25 + 1.26 +/** 1.27 + * @return enum offset, or UDBG_INVALID_ENUM on error 1.28 + */ 1.29 +U_CAPI int32_t U_EXPORT2 1.30 +udbg_enumByString(UDebugEnumType type, const icu::UnicodeString& string); 1.31 + 1.32 +/** 1.33 + * Convert a UnicodeString (with ascii digits) into a number. 1.34 + * @param s string 1.35 + * @return numerical value, or 0 on error 1.36 + */ 1.37 +U_CAPI int32_t U_EXPORT2 udbg_stoi(const icu::UnicodeString &s); 1.38 + 1.39 +U_CAPI double U_EXPORT2 udbg_stod(const icu::UnicodeString &s); 1.40 + 1.41 +U_CAPI icu::UnicodeString * U_EXPORT2 1.42 +udbg_escape(const icu::UnicodeString &s, icu::UnicodeString *dst); 1.43 + 1.44 +#endif 1.45 + 1.46 +#endif