|
-
Nov 29th, 2000, 05:32 PM
#1
Thread Starter
Lively Member
Is there a function in the VB that replicates a specific character?
For example, I need to put 100 of a zero string.
Note. I need a build-in function or better way which doesn't use a loop.
-
Nov 29th, 2000, 05:40 PM
#2
Fanatic Member
I am pretty sure you are gonna have to use a loop to do this, there is no built in function that I am aware of.
{Insert random techno-babble here}
{Insert quote from some long gone mofo here}
-
Nov 29th, 2000, 10:28 PM
#3
Addicted Member
Yes, you use String.
To make 100 spaces, you'd do this:
strString = String(100, " ")
-
Nov 29th, 2000, 11:12 PM
#4
PowerPoster
Will this better?
Code:
Dim strString As String
strString = String(100, chr(0))
or
strString = String(100, vbNull)
-
Nov 30th, 2000, 12:56 AM
#5
transcendental analytic
Chris, i think you mean vbNullchar. vbNull is used as returnvalues for variants
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.
-
Nov 30th, 2000, 01:22 AM
#6
PowerPoster
Oops...
Oops... being catch by ked-Guru....
-
Nov 30th, 2000, 09:41 AM
#7
Thread Starter
Lively Member
Thanks alot. The String function is what I've been looking for..
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
|