Charlotte Foust
cfoust at infostatsystems.com
Thu May 10 10:11:58 CDT 2007
VB.Net definitely has regular expressions, and I find them easier to use there than in VB/VBA. Charlotte Foust -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Michael Bahr Sent: Wednesday, May 09, 2007 7:00 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] VB.Net - cut and trim Hi John, have you looked at regular expressions?? You can do a lot of things in one line. I know VB 6 had them and VB.net should also have them. Mike... *********** REPLY SEPARATOR *********** On 5/9/2007 at 5:08 PM JWColby wrote: >I am looking at how to do in VB.Net what in VBA would be str = >trim(mid(str,intStartPos, intLen)) > >I can do this (I think) in two steps using: > > private mstr as string > mstr = lstrRecord.SubString(intStartPos,intWidth) > mstr = mstr.Trim(mstr.ToCharArray) > >Given what I know about VB.Net (not very darned much) is this the best way? >I see where the string builder can do the substring part but it does >not have a trim method. > >John W. Colby >Colby Consulting >www.ColbyConsulting.com > >-- >AccessD mailing list >AccessD at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/accessd >Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com