dbgutil.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. // © 2016 and later: Unicode, Inc. and others.
  2. // License & terms of use: http://www.unicode.org/copyright.html
  3. /*
  4. ************************************************************************
  5. * Copyright (c) 2007-2012, International Business Machines
  6. * Corporation and others. All Rights Reserved.
  7. ************************************************************************
  8. */
  9. /** C++ Utilities to aid in debugging **/
  10. #ifndef _DBGUTIL_H
  11. #define _DBGUTIL_H
  12. #include "unicode/utypes.h"
  13. #include "udbgutil.h"
  14. #include "unicode/unistr.h"
  15. #if !UCONFIG_NO_FORMATTING
  16. U_TOOLUTIL_API const icu::UnicodeString& U_EXPORT2
  17. udbg_enumString(UDebugEnumType type, int32_t field);
  18. /**
  19. * @return enum offset, or UDBG_INVALID_ENUM on error
  20. */
  21. U_CAPI int32_t U_EXPORT2
  22. udbg_enumByString(UDebugEnumType type, const icu::UnicodeString& string);
  23. /**
  24. * Convert a UnicodeString (with ascii digits) into a number.
  25. * @param s string
  26. * @return numerical value, or 0 on error
  27. */
  28. U_CAPI int32_t U_EXPORT2 udbg_stoi(const icu::UnicodeString &s);
  29. U_CAPI double U_EXPORT2 udbg_stod(const icu::UnicodeString &s);
  30. U_CAPI icu::UnicodeString * U_EXPORT2
  31. udbg_escape(const icu::UnicodeString &s, icu::UnicodeString *dst);
  32. #endif
  33. #endif