11cb0ef41Sopenharmony_ci// © 2016 and later: Unicode, Inc. and others.
21cb0ef41Sopenharmony_ci// License & terms of use: http://www.unicode.org/copyright.html
31cb0ef41Sopenharmony_ci
41cb0ef41Sopenharmony_ci/*
51cb0ef41Sopenharmony_ci************************************************************************
61cb0ef41Sopenharmony_ci* Copyright (c) 2007-2012, International Business Machines
71cb0ef41Sopenharmony_ci* Corporation and others.  All Rights Reserved.
81cb0ef41Sopenharmony_ci************************************************************************
91cb0ef41Sopenharmony_ci*/
101cb0ef41Sopenharmony_ci
111cb0ef41Sopenharmony_ci/** C++ Utilities to aid in debugging **/
121cb0ef41Sopenharmony_ci
131cb0ef41Sopenharmony_ci#ifndef _DBGUTIL_H
141cb0ef41Sopenharmony_ci#define _DBGUTIL_H
151cb0ef41Sopenharmony_ci
161cb0ef41Sopenharmony_ci#include "unicode/utypes.h"
171cb0ef41Sopenharmony_ci#include "udbgutil.h"
181cb0ef41Sopenharmony_ci#include "unicode/unistr.h"
191cb0ef41Sopenharmony_ci
201cb0ef41Sopenharmony_ci#if !UCONFIG_NO_FORMATTING
211cb0ef41Sopenharmony_ci
221cb0ef41Sopenharmony_ciU_TOOLUTIL_API const icu::UnicodeString& U_EXPORT2
231cb0ef41Sopenharmony_ciudbg_enumString(UDebugEnumType type, int32_t field);
241cb0ef41Sopenharmony_ci
251cb0ef41Sopenharmony_ci/**
261cb0ef41Sopenharmony_ci * @return enum offset, or UDBG_INVALID_ENUM on error
271cb0ef41Sopenharmony_ci */
281cb0ef41Sopenharmony_ciU_CAPI int32_t U_EXPORT2
291cb0ef41Sopenharmony_ciudbg_enumByString(UDebugEnumType type, const icu::UnicodeString& string);
301cb0ef41Sopenharmony_ci
311cb0ef41Sopenharmony_ci/**
321cb0ef41Sopenharmony_ci * Convert a UnicodeString (with ascii digits) into a number.
331cb0ef41Sopenharmony_ci * @param s string
341cb0ef41Sopenharmony_ci * @return numerical value, or 0 on error
351cb0ef41Sopenharmony_ci */
361cb0ef41Sopenharmony_ciU_CAPI int32_t U_EXPORT2 udbg_stoi(const icu::UnicodeString &s);
371cb0ef41Sopenharmony_ci
381cb0ef41Sopenharmony_ciU_CAPI double U_EXPORT2 udbg_stod(const icu::UnicodeString &s);
391cb0ef41Sopenharmony_ci
401cb0ef41Sopenharmony_ciU_CAPI icu::UnicodeString * U_EXPORT2
411cb0ef41Sopenharmony_ciudbg_escape(const icu::UnicodeString &s, icu::UnicodeString *dst);
421cb0ef41Sopenharmony_ci
431cb0ef41Sopenharmony_ci#endif
441cb0ef41Sopenharmony_ci
451cb0ef41Sopenharmony_ci#endif
46