I have been looking around for a while on google but no fruitful results. I am actually looking for a way to export or some how get list of all string literals e.g.
int main(){
const char *p = "Hello";
const char x[] = "World";
}
For compiling this code is there a way to know “Hello” and “World”? I do know that they are available in disassemblers (used some in Windows). But is there some proper tool to actually dump these strings or somehow export them?
Write a simple tokenizer that recognizes strings and comments and ignores everything else.