Re: subset function for string in c++



puzzlecracker wrote
(in article
<1127944988.539899.110860@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>):

>>
>> Wow. Ben's version sure seems a lot clearer. :-)
>>
>> I'm having pascal flashbacks, make it stop.
>>
>> --

> All above is NOT- again NOT NOT NOT NOT C++...

Duh. I don't recall anyone claiming it was. I think the "an
implementation in Oberon" part clued most of us in to that fact
immediately, if not for the code that followed.

> the c++ way is - are you all still with me

No, not really.

> // give some values to a and b...like
>
> a="why cannot I still write c++ code";

Nice grammar. :-)

> b="c++ code";
>
> a.find_first_not_of(b);

Nice try. Too bad the OP's question was to find out whether or
not characters in a are a subset of b. The above fails that for
several reasons. First of all, you have the contents of a and b
backwards. Secondly, this gets the index of the first character
that doesn't match, not a boolean answer, at least as written.

> That is what we call sleek C++ code in the UNITED STATES OF AMERICA!

It is? I didn't realize that "sleek" meant "fails to meet
program objectives".


> Now, re-read it 100 times and admit that above posts are flawed,
> erronous, completely bizzare and ultimately useless.

Your post was in fact flawed, erroneous (note the spelling),
somewhat bizarre, and ultimately probably not worth responding
to here.


--
Randy Howard (2reply remove FOOBAR)

.



Relevant Pages

  • Re: Attn BEN SMITH!!!!
    ... people who refuse to starve in order to read Neil and Doom's posts. ... Those monkeys ... If that fails, I will assassinate the manager of the local Wendy's by ... word Smurf haphazardly in any and all posts I make to this newsgroup, ...
    (microsoft.public.cert.exam.mcse)
  • Re: HRM
    ... "...who strives valiantly; who errs and comes short again and again; who knows the great enthusiasms, the great devotions, and spends himself in a worthy cause; who, at the best, knows the triumph of high achievement; and who, at the worst, if he fails, at least fails while daring greatly, so that his place shall never be with those cold and timid souls who knew neither victory nor defeat." ... Most of his posts in CR Basic Training had been very good - relevant and oriented toward that audience. ... Including observations that perhaps slow marathoners should maybe take some tips from ultras, since it's the same time frame. ... "So many people get stuck in the routine of life that their dreams waste away. ...
    (rec.running)
  • Re: Malformed utf8; wheres the null byte coming from?
    ... Quoth Ben Morrow: ... It only fails if the first character matches. ... Putting a second stops the warning. ...
    (comp.lang.perl.misc)
  • Re: How to sort a list of strings on a substring
    ... No, that's incorrect. ... Try it with this data and you will see it fails: ... *not* how to sort the list according to the first character '1'. ...
    (comp.lang.python)
  • Re: Office 2007 B2TR "will not go away"
    ... you didn't try everything as there have been hundreds if not thousands of posts about this issue and they all are available by searching the archives of this group. ... | A separate install for Office 2007 Visio Standard ... | fails for the same reason. ... | their so called technical help. ...
    (microsoft.public.office.setup)