BitShares-Core  7.0.2
BitShares blockchain node software and command-line wallet software
string.hpp
Go to the documentation of this file.
1 #pragma once
2 #include <fc/fwd.hpp>
3 #include <fc/optional.hpp>
4 #include <string>
5 
6 namespace fc
7 {
8  using std::string;
9 
10  int64_t to_int64( const std::string& );
11  uint64_t to_uint64( const std::string& );
12  double to_double( const std::string& );
13  std::string to_string( double );
14  std::string to_string( uint64_t );
15  std::string to_string( int64_t );
16  std::string to_string( uint16_t );
17  std::string to_pretty_string( int64_t );
18  inline std::string to_string( int32_t v ) { return to_string( int64_t(v) ); }
19  inline std::string to_string( uint32_t v ){ return to_string( uint64_t(v) ); }
20 #if defined(__APPLE__) or defined(__OpenBSD__)
21  inline std::string to_string( size_t s) { return to_string(uint64_t(s)); }
22 #endif
23 
25  class variant_object;
26  std::string format_string( const std::string&, const variant_object&, uint32_t max_object_depth = 200 );
27  std::string trim( const std::string& );
28  std::string to_lower( const std::string& );
29  string trim_and_normalize_spaces( const string& s );
30 
31  uint64_t parse_size( const string& s );
32 }
fc::to_pretty_string
std::string to_pretty_string(int64_t)
Definition: string.cpp:26
fc::to_lower
std::string to_lower(const std::string &)
Definition: string.cpp:98
fc::to_string
std::string to_string(double)
Definition: string.cpp:73
fc::to_int64
int64_t to_int64(const std::string &)
Definition: string.cpp:34
fwd.hpp
fc
Definition: api.hpp:15
fc::trim
std::string trim(const std::string &)
Definition: string.cpp:94
fc::ostring
fc::optional< std::string > ostring
Definition: url.hpp:10
fc::to_double
double to_double(const std::string &)
Definition: string.cpp:60
fc::to_uint64
uint64_t to_uint64(const std::string &)
Definition: string.cpp:47
fc::format_string
std::string format_string(const std::string &, const variant_object &, uint32_t max_object_depth=200)
fc::parse_size
uint64_t parse_size(const string &s)
Definition: string.cpp:121
fc::optional< std::string >
fc::trim_and_normalize_spaces
string trim_and_normalize_spaces(const string &s)
Definition: string.cpp:104
optional.hpp