~ubuntu-branches/ubuntu/trusty/c++-annotations/trusty

« back to all changes in this revision

Viewing changes to yo/string/convertors.yo

  • Committer: Package Import Robot
  • Author(s): Frank B. Brokken
  • Date: 2013-05-30 13:32:18 UTC
  • mfrom: (1.1.24)
  • Revision ID: package-import@ubuntu.com-20130530133218-k39mr5uredd093jr
Tags: 9.7.2-1
New upstream release, repairs several minor left-over flaws.
This release incorporates 9.7.0 and 9.7.1.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Since bf(C++11) the tt(std::string) class offers several string conversion
2
 
functions. These functions are listed below in alphabetic order. They are not
3
 
member functions, but class-less (free) functions declared in the tt(std)
4
 
namespace. Before they can be used the tthi(string) header file must have been
5
 
included. 
 
1
C++11 added several string conversion functions operating on or producing
 
2
tt(std::string) objects. These functions are listed below in alphabetic
 
3
order. They are not member functions, but class-less (free) functions declared
 
4
in the tt(std) namespace. The tthi(string) header file must have been included
 
5
before they can be used.
6
6
 
7
7
    itemization(
8
8
    ithtq(stof)(float stof(std::string const &str, size_t *pos = 0))
76
76
                                                    int base = 10)) 
77
77
       (A conversion as described with tt(stoi) is performed, but now to a
78
78
        value of type tt(long).)
79
 
    ithtq(stoll)(long stoll(std::string const &str, size_t *pos = 0, 
 
79
    ithtq(stoll)(long long stoll(std::string const &str, size_t *pos = 0, 
80
80
                                                    int base = 10)) 
81
81
       (A conversion as described with tt(stoi) is performed, but now to a
82
82
        value of type tt(long long).)
83
 
    ithtq(stoul)(unsigned long stol(std::string const &str, size_t *pos = 0, 
 
83
    ithtq(stoul)(unsigned long stoul(std::string const &str, size_t *pos = 0, 
84
84
                                                    int base = 10)) 
85
85
       (A conversion as described with tt(stoi) (not allowing an initial + or
86
86
        - character) is performed, but now to a value of type tt(unsigned
87
87
        long).)
88
 
    ithtq(stoull)(long stoull(std::string const &str, size_t *pos = 0, 
89
 
                                                    int base = 10)) 
 
88
    ithtq(stoull)(unsigned long long stoull(std::string const &str, 
 
89
                                            size_t *pos = 0, int base = 10)) 
90
90
       (A conversion as described with tt(stoul) is performed, but now to a
91
91
        value of type tt(unsigned long long).)
92
92
    ithtq(to_string)(std::string to_string(Type value))
93
93
       (Type can be of the types tt(int, long, long long, unsigned, unsigned
94
 
        long, unsigned long long, fload, double,) or tt(long double). The
 
94
        long, unsigned long long, float, double,) or tt(long double). The
95
95
        value of the argument is converted to a textual representation, which
96
96
        is returned as a tt(std::string) value.
97
97
       )