string manipulation

LittLe3Lue

Freshman
Joined
Mar 7, 2003
Messages
27
Hi all, i used to be a frequent visitor to the visualstudioforum about a year or 2 ago, maybe not popular but read a lot

i stopped programming for a long time, but i got back into it, and looks like might be here for the long haul.
i just got .Net profesional, and i am startign to realize just how many differences there are between vb6 and .net

learning slowely, but for now i have a few questions.

i was trying to use the good ol Left(sting here, amount) and right, etc etc type string manipulation, and i cant find any.
seems to be they chenged allt he functions to string.function style, but i still cant find any way to get a left/right function. aside for for looping and makign a string .concat-ing char by char, i cant find any way to do it.

ive downloaded one of the beginners guide to learnign vb.net from vb6, but they dont have the left/right functions listed.

does anyone know where i can find a good referance area for my vb6 - vb.net questions?

i was thinking about making a program that inputs code which links to other examples. using this, u can link to simular code, code that goes along with it, or the equivalent code in other languages.

search for code in vb6 and find equivalent in C++ or java.

prolly gunna play aroudn with it later, not sure whcih language to tackle the task with, and where to store the data.

any ideas on that as well? or is there already such a program that might save me time? it would be nice to find one that i can add my own data into as well..

thanks and sorry about the long winded post, hope to see you all around and get to knwo the regulars.


(side note, any way to center sig text?)
 
What you're after is the SubString function of the string class. This serves as a replacement for Left, Mid and Right:

Visual Basic:
Dim s As String = "abcdefg"

's.SubString(0, 3) = "abd"
's.SubString(3, 1) = "d"
's.SubString(s.Length - 3) = "efg"

You can also use the handy string.StartsWith and string.EndsWith functions instead of the old Left and Right sometimes.
 
hehe, thanks i figured it oit a few mins after my post.

i just got the .indexof("x") value and did: 1 to indexof("x") , or .indexof("x") to text.length

thanks for the heads up
:)
 
wow divil, really nice webiste u got going, i got your winxp menus thing, havent been able to look at it yet, did u use existing code to simplify it, or make the menus entirely yourself and made them look like the xp menus?
 
Back
Top