The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 Forum for Origin C
 Problem with function string::GetNumTokens()
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

hajo_old

Germany
141 Posts

Posted - 01/29/2003 :  09:38:56 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hello, all

I want to get the number of tokens contained in the following string:

string str = "Zeit [ms] U [\V] I [A] Einspritzrate [mm/ms]"

by the following C call:

int num = str.GetNumTokens(']');

The expected result should be: 4,
but I get 1!!

What is going wrong here! Is it possibly a bug?!

p.s.:

int num = str.GetNumTokens('[');

returns 5 as expected!!

Thanks
HJKoch
SVDO_Origin1
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000