* Read bytes from file stream as plain text * @param fileStream Representation of input file * @param plain Into this parameter the resulting string is stored * @param start Start offset of read * @param desiredSize Number of bytes for read. If this parameter is set to zero, * function will read all bytes from @a start until end of file. * @return @c true if operation went OK, otherwise @
| 49 | * If function returns @c false, @a plain is set to empty string |
| 50 | */ |
| 51 | bool readPlainString(std::istream &fileStream, std::string &plain, std::size_t start, std::size_t desiredSize) |
| 52 | { |
| 53 | std::vector<unsigned char> bytes; |
| 54 | if(!readFile(fileStream, bytes, start, desiredSize)) |
| 55 | { |
| 56 | return false; |
| 57 | } |
| 58 | |
| 59 | bytesToString(bytes, plain); |
| 60 | return true; |
| 61 | } |
| 62 | |
| 63 | } // namespace fileformat |
| 64 | } // namespace retdec |
nothing calls this directly
no test coverage detected