Need help accomplishing something using descriptors

Login to reply to this topic.
Sat, 2008-01-05 22:47
Joined: 2007-05-03
Forum posts: 2

I have a descriptor. I need to locate a specific sequence of characters, then copy the contents from after this character, until the next CRLF, to another descriptor.

I have this in one descriptor:

ABC123
DEF456
GHI789

I want to find 'DEF' and have '456' in another descriptor:

I can of course perform a Find() to locate the starting point of the sequence, but after this I'm lost. I reviewed the SDK documentation for the descriptor classes and have searched the forums here.

What is the general approach for this? It doesn't seem like something too unusual.

I was thinking after locating the sequence, copy from here + 3 to the end of the original sequence to a descriptor:

456
GHI789

...then trim characters after (and including the first CRLF:

456

But I don't even see a way to use Copy() to do this.

I also though about using Match(), but it seems that you have to know the number of characters even when using wildcards. In my example there is no way to know how many characters long the '456' part will be.

Thanks.


Sun, 2008-01-06 03:27
Joined: 2004-07-17
Forum posts: 110
Re: Need help accomplishing something using descriptors

I must admit I don't do much string processing on Symbian but for some reason the phrase "TLex" springs to mind. Look it up in the SDK docs...

  • Login to reply to this topic.