michael@0: michael@0: /* michael@0: ************************************************************************ michael@0: * Copyright (c) 2007-2012, International Business Machines michael@0: * Corporation and others. All Rights Reserved. michael@0: ************************************************************************ michael@0: */ michael@0: michael@0: /** C++ Utilities to aid in debugging **/ michael@0: michael@0: #ifndef _DBGUTIL_H michael@0: #define _DBGUTIL_H michael@0: michael@0: #include "unicode/utypes.h" michael@0: #include "udbgutil.h" michael@0: #include "unicode/unistr.h" michael@0: michael@0: #if !UCONFIG_NO_FORMATTING michael@0: michael@0: U_TOOLUTIL_API const icu::UnicodeString& U_EXPORT2 michael@0: udbg_enumString(UDebugEnumType type, int32_t field); michael@0: michael@0: /** michael@0: * @return enum offset, or UDBG_INVALID_ENUM on error michael@0: */ michael@0: U_CAPI int32_t U_EXPORT2 michael@0: udbg_enumByString(UDebugEnumType type, const icu::UnicodeString& string); michael@0: michael@0: /** michael@0: * Convert a UnicodeString (with ascii digits) into a number. michael@0: * @param s string michael@0: * @return numerical value, or 0 on error michael@0: */ michael@0: U_CAPI int32_t U_EXPORT2 udbg_stoi(const icu::UnicodeString &s); michael@0: michael@0: U_CAPI double U_EXPORT2 udbg_stod(const icu::UnicodeString &s); michael@0: michael@0: U_CAPI icu::UnicodeString * U_EXPORT2 michael@0: udbg_escape(const icu::UnicodeString &s, icu::UnicodeString *dst); michael@0: michael@0: #endif michael@0: michael@0: #endif