|
-
April 30th, 2001, 03:16 PM
#1
substr
Please reply to this question. Previous one went to home email address. I'm at work.
Is there a substr equivelent in VB. I use it in perl. I want to be able to extra "pm" in a date variable
-
May 2nd, 2001, 02:31 AM
#2
-
May 2nd, 2001, 02:49 AM
#3
Re: substr
Have a look also at instr function. It will help you find what you want inside a string (to give correct parameter to Mid function when you do not know exactly how is written a string)
Special thanks to Lothar "the Great" Haensler. Come back soon, you Guru.
...at present time, using mainly Net 4.0, Vs 2010
Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
-
October 10th, 2005, 04:23 AM
#4
substr
Is there a substr equivelent in Visual c++ (mfc)? thanks.
-
October 10th, 2005, 05:17 AM
#5
Re: substr
You can make your own function, 'cause I don't think there's a good function...
Something like this I guess?
Code:
char* subStrng(char* const chrOrig, int begin, int size)
{
char *chrNew = new char[size];
for (int i=0; i<size; i++) {
chrNew[i] = chrOrig[i+begin];
}
return chrNew;
}
Edit;
I think CString has a mid-function... maybe you can use that;
http://msdn.microsoft.com/library/de...g.3a3a.mid.asp
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|