I have several strings in a text file and I want to search each string for a word starting with "<" and ending with ">". I then want to replace everything from < to > with a new string. So here's a couple lines I want to convert:
400110: 0c12ac0c jal 4ab030 <__do_global_ctors_aux>
40019c: 10400003 beqz v0,4001ac <call_gmon_start+0x1c>
*note the different string lengths.
So I'm using a line like this to look for "<" within a string:
if( ... test.find("<")!=string::npos ... ){ ...
Is there a good way to find the start and finish of my < to > word without explicitly defining an iterator to traverse the string starting at the point where "<" was found until a ">" is found? This is doable but i have a feeling there is some sort of string function that allows one to do this.