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
Printable View
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
use the Mid function
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.
Is there a substr equivelent in Visual c++ (mfc)? thanks.
You can make your own function, 'cause I don't think there's a good function...
Something like this I guess?
Edit;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;
}
I think CString has a mid-function... maybe you can use that;
http://msdn.microsoft.com/library/de...g.3a3a.mid.asp