mirror of
https://github.com/pocoproject/poco.git
synced 2025-07-04 17:40:01 +02:00
GH #440 changed default string format
This commit is contained in:
parent
556d8cf1c4
commit
c1eb293261
@ -55,7 +55,7 @@ public:
|
|||||||
Timestamp timestamp() const;
|
Timestamp timestamp() const;
|
||||||
/// Returns the timestamp which is stored in the first four bytes of the id
|
/// Returns the timestamp which is stored in the first four bytes of the id
|
||||||
|
|
||||||
std::string toString(const std::string& fmt = "%x") const;
|
std::string toString(const std::string& fmt = "%02x") const;
|
||||||
/// Returns the id in string format. The fmt parameter
|
/// Returns the id in string format. The fmt parameter
|
||||||
/// specifies the formatting used for individual members
|
/// specifies the formatting used for individual members
|
||||||
/// of the ID char array.
|
/// of the ID char array.
|
||||||
|
@ -417,7 +417,7 @@ void MongoDBTest::testObjectID()
|
|||||||
str.append(1, (char) 0x02);
|
str.append(1, (char) 0x02);
|
||||||
|
|
||||||
ObjectId oid(str);
|
ObjectId oid(str);
|
||||||
std::string str2 = oid.toString("%02x");
|
std::string str2 = oid.toString();
|
||||||
assert(str2 == "536aeebba081de6815000002");
|
assert(str2 == "536aeebba081de6815000002");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user