563 /*! |
563 /*! |
564 * \brief Constructs a string from a vector of bytes. The bytes do not have to be null-terminated. |
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 |
565 * \param bytes Bytes to use for construction |
566 * \returns the resulting string. |
566 * \returns the resulting string. |
567 */ |
567 */ |
568 String String::fromBytes(const Vector<unsigned char>& bytes) |
568 String String::fromBytes(const ByteArray& bytes) |
569 { |
569 { |
570 return String(reinterpret_cast<const Vector<char>&>(bytes)); |
570 return String(reinterpret_cast<const Vector<char>&>(bytes)); |
571 } |
571 } |
572 |
572 |
573 /*! |
573 /*! |