|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Free Web 2.0 Code Generator! Generate data entry and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
|||
|
|||
|
String manipulation
<i><b>Originally posted by : Joe (solidst8@hotmail.com)</b></i><br />Can somebody help me with this? I want to write a function that checks to see if a string has spaces and then replaces the spaces with an underscore.<br /><br />Here's what I started with so far:<br /><br />Dim uploadedfile<br />Dim strSpace<br />Dim findspace<br /><br />uploadedfile = Request.Querystring(trim("uploadedfile"))<br />strSpace = " "<br />findspace = InStr(uploadedfile,strSpace)<br />if (findspace) then<br /> uploadedfile = (left(uploadedfile,findspace-1)+"_"+right(uploadedfile,findspace+1))<br />end if<br /><br />This only checks for one space. How can I do multiple spaces. <br /><br />Thanks in advance.
|
|
#2
|
|||
|
|||
|
<i><b>Originally posted by : vicky (vickykapil@hotmail.com)</b></i><br />hi Joe!<br /> why don't you use the Replace function like this:--><br />str1="Joe k"<br /><br />str1=replace(str1," ",_)<br /><br />response.write str1.<br />it'll definately write joe_k.<br />i hope i have cleared you if you still have doubts then tell me.<br />regards,<br />Vicky.<br /><br />------------<br />Joe at 8/11/2000 6:04:09 PM<br /><br />Can somebody help me with this? I want to write a function that checks to see if a string has spaces and then replaces the spaces with an underscore.<br /><br />Here's what I started with so far:<br /><br />Dim uploadedfile<br />Dim strSpace<br />Dim findspace<br /><br />uploadedfile = Request.Querystring(trim("uploadedfile"))<br />strSpace = " "<br />findspace = InStr(uploadedfile,strSpace)<br />if (findspace) then<br /> uploadedfile = (left(uploadedfile,findspace-1)+"_"+right(uploadedfile,findspace+1))<br />end if<br /><br />This only checks for one space. How can I do multiple spaces. <br /><br />Thanks in advance.
|
![]() |
| Viewing: ASP Free Forums > Programming > .NET Development > String manipulation |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|
|