Advertisement

11.09.2007 at 12:52PM PST, ID: 22951127
[x]
Attachment Details

VB.net Split a string in two and add part in middle

Asked by Rocker4500 in Microsoft Visual Basic.Net, Miscellaneous Programming, Visual Studio .NET 2005

Tags: string, split

OK, im using vb.net and what i want to do is split a string into two parts and after the first part add another string and then join them together e.g.

String 1 - 'Hello there, what are you up too'
String2 - 'how are you,'

split Straing1 into two parts e.g. 'Hello there,' and 'what are you up too'

add both parts of string1 and string2 together e.g.
'Hello there, how are you, what are you up too'


I have a string full of identifiers e.g. "-r -t -g -u"

however the adentifierys dont always exist in the string, so i have to search for it:

gotargs = get_args(groupargslist)   <<<< sets the string e.g. '-r -t -h -a -j -k'
                search = gotargs.IndexOf("-a")
                If search > 0 Then


so now what i want is to split this string AFTER the found possition being '-a'  possiton 8
split the string into two and then join them together with the contents of another string in the middle.

I hope you follow that!

GaryStart Free Trial
[+][-]11.09.2007 at 08:00PM PST, ID: 20254566

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11.10.2007 at 09:47AM PST, ID: 20256449

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Microsoft Visual Basic.Net, Miscellaneous Programming, Visual Studio .NET 2005
Tags: string, split
Sign Up Now!
Solution Provided By: Idle_Mind
Participating Experts: 4
Solution Grade: A
 
 
[+][-]11.10.2007 at 12:37PM PST, ID: 20256939

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11.10.2007 at 12:40PM PST, ID: 20256944

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12.13.2007 at 11:36AM PST, ID: 20466893

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.05.2008 at 03:46PM PST, ID: 20591632

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628