|
-
Jun 5th, 2000, 09:05 PM
#1
Thread Starter
Lively Member
how can i delete all spaces from a string ?
for example: if i have - h e l l o w o r l d
and i want to make of it: helloworld
how can i do that ?
-
Jun 5th, 2000, 09:10 PM
#2
_______
spaces
'replace function in VB6
'find an instance and replace it with another
Private Sub Form_Load()
string1 = "h e l l o w o r l d
MsgBox string1
string2 = Replace(string1, " ", "")
'String1 is now "helloworld"
MsgBox string2
End Sub
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Jun 5th, 2000, 09:40 PM
#3
Thread Starter
Lively Member
my mistake, i did not ask the question right.
i need to delete only spaces befor and after the string.
the ones in the middle should stay.
for example:
[ hello world ]
will be:
[hello world]
how can i do that ?
-
Jun 5th, 2000, 09:42 PM
#4
Fanatic Member
Code:
myStr = " Hello World "
myStr = Trim$(myStr)
Iain, thats with an i by the way!
-
Jun 5th, 2000, 09:46 PM
#5
transcendental analytic
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
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
|