BitShares-Core  5.0.0
BitShares blockchain implementation and command-line interface 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 }
std::string format_string(const std::string &, const variant_object &, uint32_t max_object_depth=200)
std::string to_lower(const std::string &)
Definition: string.cpp:98
string trim_and_normalize_spaces(const string &s)
Definition: string.cpp:104
An order-perserving dictionary of variant&#39;s.
int64_t to_int64(const std::string &)
Definition: string.cpp:34
std::string to_pretty_string(int64_t)
Definition: string.cpp:26
double to_double(const std::string &)
Definition: string.cpp:60
uint64_t parse_size(const string &s)
Definition: string.cpp:121
uint64_t to_uint64(const std::string &)
Definition: string.cpp:47
fc::optional< std::string > ostring
Definition: url.hpp:10
std::string to_string(double)
Definition: string.cpp:73
Definition: api.hpp:15
std::string trim(const std::string &)
Definition: string.cpp:94