-
Notifications
You must be signed in to change notification settings - Fork 648
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get rid of fc/io/fstream.hpp #2047
base: develop
Are you sure you want to change the base?
Conversation
#include <string> | ||
|
||
namespace graphene { namespace utilities { | ||
|
||
/** | ||
* @brief Reads the file at the given path and returns the full contents in a string. Note that the result | ||
* will contain non-printable characters if the file does. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I saw "non-printable characters", '\0' didn't come to my mind. I don't know whether it's only me though. Perhaps better if we explicitly mention '\0'? Callers need to be careful when using this function, since functions like c_str()
are heavily used in the code base, a strcpy()
or strlen()
call on the result of c_str()
may return unexpected results.
Part of #1116 / #1584