This page was last modified 13:30, 8 December 2007.
Getting tokens
From Forum Nokia Wiki
Following code snippet illustrate how to extract tokens from the available data.
CDesC16Array *array= new (ELeave) CDesC16ArrayFlat(10); _LIT(KData,"This is the token example." \ "You will get different tokens in array."); TLex lex(KData); do { TPtrC token = lex.NextToken(); if(token.Length() == 0) break; array->AppendL(token); } while(1);
Note: This is just an example which extract tokens from string defined using _LIT macro. However you can use this code in general terms. You can extract tokens from descriptors, file data etc. Here Array granularity is taken as 10. You can use granularity on your application's discretion.
| Related Discussions | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to gracefully read files completely using RFileReadStream | tkedem | General Symbian C++ | 2 | 2003-12-15 06:44 |
| wbxml encodoing query | pcimring | General Messaging | 2 | 2008-03-26 18:40 |
| SMSC Gateway service Available | rampriyak | General Messaging | 0 | 2002-11-07 11:25 |
| wbxml landmark | ricei | General Messaging | 1 | 2008-02-08 13:29 |
| wbxml landmark file | ricei | Location Based Services and Navigation | 6 | 2008-02-09 13:21 |
