borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (VBA Beginner How To Computer Programming FreeEbook)Next Topic (array initialization) New Topic New Poll Post Reply
AndreaVB Forum : VB General : string slices
Poster Message
cleopard
Level: Big Cheese

Registered: 02-09-2005
Posts: 28

icon string slices

Here's another question that should be easy, but I haven't been able to find my answer (as other things I've tried haven't pleased the compiler).  How do I go about simply modifying a slice of a string (in my case, just one character)?  If I find an invalid character in a string, I want to substitute another one for it.  Something like

filename(3) = "-"

obviously won't work.

12-12-2006 at 08:01 PM
View Profile Send Email to User Show All Posts | Quote Reply
admin
Level: Administrator


Registered: 04-04-2002
Posts: 530
icon Re: string slices

this replaces character 3 in your string with "-"

mid(filename,3,1)="-"


____________________________
AndreaVB

13-12-2006 at 09:31 AM
View Profile Send Email to User Show All Posts Visit Homepage | Quote Reply
AndreaVB Forum : VB General : string slices
Previous Topic (VBA Beginner How To Computer Programming FreeEbook)Next Topic (array initialization) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder