PC Review


Reply
Thread Tools Rate Thread

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

 
 
Andrew Backer
Guest
Posts: n/a
 
      21st Jun 2005
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.

 
Reply With Quote
 
 
 
 
jabailo@texeme.com
Guest
Posts: n/a
 
      21st Jun 2005
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.
 
Reply With Quote
 
Nick Malik [Microsoft]
Guest
Posts: n/a
 
      21st Jun 2005
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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.
>



 
Reply With Quote
 
Andrew Backer
Guest
Posts: n/a
 
      23rd Jun 2005
.... 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

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to make two references to one string that stay refered to the same string reguardless of the changing value in the string? Daniel Microsoft Dot NET 7 12th Nov 2004 09:08 AM
how to make two references to one string that stay refered to the same string reguardless of the changing value in the string? Daniel Microsoft C# .NET 10 3rd Nov 2004 03:26 PM
Cannot create an object of type 'System.String[]' from its string representation 'String[] Array' for the 'Options' property. Hessam Microsoft C# .NET 0 8th Aug 2003 09:45 AM
Re: Converting a string to a string that contains the ASCII values of each letter in the origional string Mikael Jansson Microsoft C# .NET 0 31st Jul 2003 08:42 PM
Re: Converting a string to a string that contains the ASCII values of each letter in the origional string Frank Oquendo Microsoft C# .NET 0 31st Jul 2003 08:36 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:21 PM.