1 //===-- StringConvert.h -----------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef liblldb_StringConvert_h_
11 #define liblldb_StringConvert_h_
18 // Other libraries and framework includes
21 namespace lldb_private {
23 namespace StringConvert {
25 //----------------------------------------------------------------------
26 /// @namespace StringConvert StringConvert.h "lldb/Host/StringConvert.h"
27 /// @brief Utility classes for converting strings into Integers
28 //----------------------------------------------------------------------
31 ToSInt32 (const char *s, int32_t fail_value = 0, int base = 0, bool *success_ptr = nullptr);
34 ToUInt32 (const char *s, uint32_t fail_value = 0, int base = 0, bool *success_ptr = nullptr);
37 ToSInt64 (const char *s, int64_t fail_value = 0, int base = 0, bool *success_ptr = nullptr);
40 ToUInt64 (const char *s, uint64_t fail_value = 0, int base = 0, bool *success_ptr = nullptr);
43 ToDouble (const char *s, double fail_value = 0.0, bool *success_ptr = nullptr);
44 } // namespace StringConvert
45 } // namespace lldb_private