|
-
Dec 2nd, 2010, 12:05 PM
#1
Thread Starter
Fanatic Member
string Manipulation
Hi,
i have a string and a avalue like below.
Dim sTemp as String="GWIWJF+TheSansSemiBold-Plain
16 dict begin
/FontName /GWIWJF+TheSansSemiBold-Plain_00 def
/FontType 1 def"
i need to replace the first line of this string, without looping is there any way to do this.
sTemp = "16 dict begin
/FontName /GWIWJF+TheSansSemiBold-Plain_00 def
/FontType 1 def"
Last edited by vijy; Dec 2nd, 2010 at 12:12 PM.
Visual Studio.net 2010
If this post is useful, rate it

-
Dec 2nd, 2010, 12:09 PM
#2
- Coding Examples:
- Features:
- Online Games:
- Compiled Games:
-
Dec 2nd, 2010, 12:14 PM
#3
Lively Member
Re: string Manipulation
May i suggest getting a more updated version of visual basic? The express edition is free.
you can do STRINGNAME.replace("REPLACETHIS", "WITHTHIS")
--------------------
Sorry I can't help you here.
Last edited by crazy1993; Dec 2nd, 2010 at 12:36 PM.
~Dustin Schreiber
Head Developer for TechJive Dev Team - Founder of http://www.thetechsphere.com
Who *cares* if a laser guided 500 lb bomb is accurate to within 9 feet?
Teamwork is essential. It gives the enemy someone else to shoot at.
Retreating?! Hell no, we're just attacking the other direction!
Please rate posts if you find them helpful
<--- Over there genius
-
Dec 2nd, 2010, 12:19 PM
#4
Re: string Manipulation
try this:
vb Code:
Dim sTemp As String = "GWIWJF+TheSansSemiBold-Plain" & _
"16 dict begin" & _
"/FontName /GWIWJF+TheSansSemiBold-Plain_00 def" & _
"/FontType 1 def"
sTemp = sTemp.Remove(0, sTemp.IndexOf("16"))
MsgBox(sTemp)
- Coding Examples:
- Features:
- Online Games:
- Compiled Games:
-
Dec 2nd, 2010, 12:22 PM
#5
Thread Starter
Fanatic Member
Re: string Manipulation
 Originally Posted by .paul.
which part? just GWIWJF?
no.. i need to replace the first line or we can tell first enter mark.
Visual Studio.net 2010
If this post is useful, rate it

-
Dec 2nd, 2010, 12:27 PM
#6
Re: string Manipulation
vb Code:
Dim sTemp As String = "GWIWJF+TheSansSemiBold-Plain" & ControlChars.Cr & _
"16 dict begin" & ControlChars.Cr & _
"/FontName /GWIWJF+TheSansSemiBold-Plain_00 def" & ControlChars.Cr & _
"/FontType 1 def"
sTemp = sTemp.Remove(0, sTemp.IndexOf(ControlChars.Cr))
MsgBox(sTemp)
- Coding Examples:
- Features:
- Online Games:
- Compiled Games:
-
Dec 2nd, 2010, 12:38 PM
#7
Thread Starter
Fanatic Member
Re: string Manipulation
 Originally Posted by .paul.
try this:
vb Code:
Dim sTemp As String = "GWIWJF+TheSansSemiBold-Plain" & _
"16 dict begin" & _
"/FontName /GWIWJF+TheSansSemiBold-Plain_00 def" & _
"/FontType 1 def"
sTemp = sTemp.Remove(0, sTemp.IndexOf("16"))
MsgBox(sTemp)
huh,, my string is dynamic one... only first new line is the thing,..
Visual Studio.net 2010
If this post is useful, rate it

-
Dec 2nd, 2010, 12:40 PM
#8
- Coding Examples:
- Features:
- Online Games:
- Compiled Games:
-
Dec 2nd, 2010, 12:54 PM
#9
Thread Starter
Fanatic Member
Re: string Manipulation
 Originally Posted by .paul.
see post #6
Thanks paul.
Visual Studio.net 2010
If this post is useful, rate it

Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|