Click here to Skip to main content
16,010,918 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Using MFC to host web browser control Pin
Colin J Davies7-May-01 15:32
Colin J Davies7-May-01 15:32 
GeneralRe: Using MFC to host web browser control Pin
RobJones8-May-01 5:30
RobJones8-May-01 5:30 
GeneralRe: Using MFC to host web browser control Pin
Colin J Davies8-May-01 11:05
Colin J Davies8-May-01 11:05 
GeneralRe: Using MFC to host web browser control Pin
RobJones8-May-01 11:32
RobJones8-May-01 11:32 
GeneralString Parsing Pin
aj4-May-01 10:32
aj4-May-01 10:32 
GeneralRe: String Parsing Pin
Masaaki Onishi5-May-01 4:43
Masaaki Onishi5-May-01 4:43 
GeneralRe: String Parsing Pin
aj7-May-01 10:01
aj7-May-01 10:01 
GeneralRe: String Parsing Pin
#realJSOP6-May-01 2:39
professional#realJSOP6-May-01 2:39 
Check out my CStringParser class (posted here on CodeProject). It supports "quoted" strings, but you're using matching braces, so you'd have to replace the '{' and '}' with a suitable character, like a double quote or maybe even a caret.

Here's how it would work:

CString sMyString = "{ 1 1 administrator Default {} {} 0 {}}";
// remove the curly brace and space characters from the beginning of the string
sMyString.Mid(2);
// remove the last curly brace from the end of the string
sMyString.Left(0, sMyString.GetLength() - 1);
// replace the braces
sMyString.Replace('{', '\"');
sMyString.Replace('}', '\"');
// now parse the string
CStringParser sParser(sMyString,' ', '\"');

You should get the following string values as a result:

sParser.GetField(0) - "1 1 administrator Default "" "" 0 """
sParser.GetField(1) - "1"
sParser.GetField(2) - "1"
sParser.GetField(3) - "administrator"
sParser.GetField(4) - "Default"
sParser.GetField(5) - ""
sParser.GetField(6) - ""
sParser.GetField(7) - "0"
sParser.GetField(5) - ""




GeneralRe: String Parsing Pin
aj7-May-01 10:16
aj7-May-01 10:16 
GeneralResource Pin
4-May-01 10:09
suss4-May-01 10:09 
GeneralRe: Resource Pin
Christian Graus4-May-01 15:11
protectorChristian Graus4-May-01 15:11 
GeneralActive movie ACTIVEX Pin
Ghasrfakhri4-May-01 7:15
Ghasrfakhri4-May-01 7:15 
GeneralSpecial Folders Pin
4-May-01 5:23
suss4-May-01 5:23 
GeneralpDevMode member of JOB_INFO_2 is empty in 98 Pin
4-May-01 5:02
suss4-May-01 5:02 
Questionconvert existing C++ program to MFC? Pin
4-May-01 2:42
suss4-May-01 2:42 
AnswerRe: convert existing C++ program to MFC? Pin
Garth J Lancaster4-May-01 16:24
professionalGarth J Lancaster4-May-01 16:24 
GeneralExtending a dialog on button press! Pin
Ashman3-May-01 23:09
Ashman3-May-01 23:09 
GeneralRe: Extending a dialog on button press! Pin
Christian Graus3-May-01 23:40
protectorChristian Graus3-May-01 23:40 
QuestionArray of bound ADO objects? Pin
Brendan Tregear3-May-01 19:47
Brendan Tregear3-May-01 19:47 
AnswerRe: Array of bound ADO objects? Pin
Brendan Tregear6-May-01 12:18
Brendan Tregear6-May-01 12:18 
AnswerRe: Array of bound ADO objects? Pin
Hadi Rezaee7-May-01 3:11
Hadi Rezaee7-May-01 3:11 
GeneralForcing the system tray clock to redraw Pin
Peter Jones3-May-01 18:40
Peter Jones3-May-01 18:40 
GeneralRe: Forcing the system tray clock to redraw Pin
Peter Jones3-May-01 20:45
Peter Jones3-May-01 20:45 
Generaldisableing ur key board Pin
Anil3-May-01 18:32
Anil3-May-01 18:32 
GeneralRe: disableing ur key board Pin
Christian Graus3-May-01 19:58
protectorChristian Graus3-May-01 19:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.