linux - How to expand path containing environment variable in C++ -


is there way expand environment variables in path? example:

std::string mypath = expandenv("$some_var/dir/") 

so when mypath printed contains absolute path result expanding $some_var ? remember seeing done somewhere, or might have implemented myself, can't remember where.

i know windows have it, there in c++ stl, boost or linux headers that?

i ended writing regex , expanded matches


Comments