arg! I just want a String.Contains()!

  • Thread starter Thread starter Andrew Backer
  • Start date Start date
A

Andrew Backer

That's all, that and one or two other simple helper functions that I
have to re-write over and over and over :(

Why is there no String.Contains()? I look for it every day!
Tis just return str.IndexOf(find)!=-1;

Rants overwhelm the raves, since it's no fun to gush over a well done
framework :) GJ guys.
 
Andrew said:
That's all, that and one or two other simple helper functions that I
have to re-write over and over and over :(

Why is there no String.Contains()? I look for it every day!
Tis just return str.IndexOf(find)!=-1;

Rants overwhelm the raves, since it's no fun to gush over a well done
framework :) GJ guys.

There's no one stopping you from writing your own assemblies and putting
them in the GAC for use by any application.
 
Create your own helper classes and reference them in your projects. No
reason to write things over and over.

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
 
.... yes, i know, and I do, and they are for different clients and
sharing technically isn't allowed or I don't control the whole project
or the damn thing is so simple, and I like things self contained so no
gac and no real good reason...

// (from java? I don't remember) , I would like to be able to do :
string funkeyText = this.txtInputThingy.text;
if ( funkeyText.Contains( "key") ) { ... }

It's just so *natural* that I keep typing it in automatically and going
"whoops" over and over again. Every time I say "oh! that's right! why
isn't that there? everything else is?". It had just happend for the
Nth time, so I wrote about it. Other than that I have almost no use
for string helpers, since the class is so friendly to start with.

- Andrew
 
Back
Top