473,574 Members | 3,176 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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(fin d)!=-1;

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

Jul 21 '05 #1
3 1072
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(fin d)!=-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.goo glegroups.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(fin d)!=-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.txtInputTh ingy.text;
if ( funkeyText.Cont ains( "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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
9028
by: aa | last post by:
Anybody know the solution to trailing space in argument of Runtime.getRuntime().exec(arg), Process p = Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler C:\\Documents and Settings\\XX\\Desktop\\- Copy of TestingFolder -\\jjjj hihi.doc"); where there is 2 space between dash and "Copy of TestingFolder", but after going...
4
3998
by: Sam Smith | last post by:
I am using optparse for the commandline parsing for my programs. I was wondering if it is possible to detect if an option or option-arg has been specified on the commandline by the user or not. Please do not suggest default value solutions. Thanks.
1
2429
by: Manlio Perillo | last post by:
Hi. As I can see, the arg function for complex numbers -- for polar representation: z = abs(x) exp(arg(z)) -- is missing! Why? Thanks and regards Manlio Perillo
8
1501
by: Hunter Hou | last post by:
hello, I'm reading <the C++ programming language>, here's a question for bind2nd. Who can help explain what on earth bind2nd is working? .... void rotate_all( list<Shape*>& ls, int angle ) { for_each( ls.begin(), ls.end(), bind2nd( mem_fun( &Shape::rotate ),
18
2191
by: Daniel Schüle | last post by:
Hello all, I often have to deal with complex numbers using python iteractive as calculator I wonder why there are no methods like arg, abs well one can use c = 1+1j abs(c)
2
6557
by: Gvs | last post by:
Hi, I'm trying to compile an example semaphore .c file taken straight from the internet, but it won't compile with the error; gcc seminit.c -o seminit seminit.c: In function `main': seminit.c:16: error: storage size of 'arg' isn't known Does anyone know how to correct this error.??
2
2690
by: flogic | last post by:
Hi i m a newbie to python .. jus started to learn ...am quite confused about variable arguments used in python functions and in init. i dont where to use **keys , **kwds,*args ...etc... if anyone culd give some explanation with examples or clear detailed web link, it wuld be helpful to me
16
1299
by: Tuomas | last post by:
>>def g(*arg): .... return arg .... ('foo', 'bar') .... (('foo', 'bar'),) TV
1
1334
by: spam_to_dev_null | last post by:
The following C++ program compiles without warning message under RedHat 9.4 with a recent version of g++: // all put in file main.cpp for simplicity #include <stdio.h> class MyClass { public: void func (int); void func (int&);
3
4469
by: dissectcode | last post by:
Hello - I have this simple code that gives me the warning: "int format, pointer arg (arg 3)" BOOL read, write; FILE *t; more code... fprintf( t, "Operation is %c\n", (read)?"READ":(write)?"WRITE":"none" );
0
7764
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8110
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
6514
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5658
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5336
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3775
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3794
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1375
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1102
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.