does anyone here could share with me a working code to get a substring from a string?
maCo<maCo@somewhere.com>
how can I get the email string "maCo@somewhere.com"? :(
thank you
maCo<maCo@somewhere.com>
how can I get the email string "maCo@somewhere.com"? :(
thank you
You could check out the str.substr function in the HLA standard library. The source code is available at http://webster.cs.ucr.edu
does anyone here could share with me a working code to get a substring from a string?
maCo<maCo@somewhere.com>
how can I get the email string "maCo@somewhere.com"? :(
thank you
Loop through the string byte by byte until you found a "<" and then write everything into a buffer until you find the next ">". Ya even dont need any API for that.
maCo,
Have a look in the MASM32 library, there is an exact function that will do your example and there are others to do string manipulation.
Regards,
hutch@movsd.com
Have a look in the MASM32 library, there is an exact function that will do your example and there are others to do string manipulation.
Regards,
hutch@movsd.com
Loop through the string byte by byte until you found a "<" and then write everything into a buffer until you find the next ">". Ya even dont need any API for that.
Hmm, could u give a example of stepping it byte to byte?
thanks :)
Look at this thread. There you have an example of stepping through the string byte by byte until you found what you are looking for. In this case I am looking for "RMC" and the following characters until a 0Dh is found.
Hope it helps
Hope it helps
lea esi,buffer1
lea edi,buffer2
xor ecx,ecx
@@:
mov al,BYTE PTR[esi+ecx]
inc ecx
cmp al,"<"
jne @B
add esi,ecx
xor ecx,ecx
@@:
mov al,BYTE PTR[esi+ecx]
cmp al,">"
je @F
mov BYTE PTR[edi+ecx],al
inc ecx
jmp@B
@@:
Coded on the fly... inform me if it is wrong.