sources/mystring.cpp

branch
protocol5
changeset 159
970d58a01e8b
parent 150
37db42ad451a
parent 158
de7574d292ad
child 195
be953e1621d9
equal deleted inserted replaced
155:9f71f854474a 159:970d58a01e8b
559 ::sprintf (buffer, "%f", value); 559 ::sprintf (buffer, "%f", value);
560 return String (buffer); 560 return String (buffer);
561 } 561 }
562 562
563 /*! 563 /*!
564 * \brief Constructs a string from a vector of bytes. The bytes do not have to be null-terminated.
565 * \param bytes Bytes to use for construction
566 * \returns the resulting string.
567 */
568 String String::fromBytes(const ByteArray& bytes)
569 {
570 return String(reinterpret_cast<const Vector<char>&>(bytes));
571 }
572
573 /*!
564 * \returns the MD5-checksum of this string. 574 * \returns the MD5-checksum of this string.
565 */ 575 */
566 String String::md5() const 576 String String::md5() const
567 { 577 {
568 char checksum[33]; 578 char checksum[33];

mercurial