Not directly. There are regex tools, and the string find and replace functions … between the three you can do most of it but its not going to be a short one-line command, it will be multiple steps.
AWK source is probably in C or C++ and should be available online as source code, you could *probably* embed it directly into your program with some effort.
c++ has powerful string functions, but one thing about power is it usually comes in the form of many lower level tools rather than a more friendly all in one command. You can do anything you want with a string in c++.