471,354 Members | 2,033 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,354 software developers and data experts.

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

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.

Jul 21 '05 #1
3 1018
Andrew Backer wrote:
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.
Jul 21 '05 #2
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.
--
"Andrew Backer" <aw******@gmail.com> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
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.

Jul 21 '05 #3
.... 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

Jul 21 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Manlio Perillo | last post: by
8 posts views Thread by Hunter Hou | last post: by
18 posts views Thread by Daniel Schüle | last post: by
2 posts views Thread by Gvs | last post: by
2 posts views Thread by flogic | last post: by
16 posts views Thread by Tuomas | last post: by
1 post views Thread by spam_to_dev_null | last post: by
3 posts views Thread by dissectcode | last post: by
reply views Thread by XIAOLAOHU | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.