Thursday, June 5, 2008

What can the string function StrDup() do ?

First of all StrDup() fuction is a member of the Microsoft.VisualBasic.Strings.
It comes in three flavors:

StrDup(Integer,Char) as String
StrDup(Integer, Object) as Object
StrDup(Integer,String) as String

What it returns in each case is the first character of the
string the number of times.

Say, if the string is "yes" and the integer is 7 you would get
yyyyyyy as the return value. In the case of the argument
Object, the object should be either a string or a char.

Observe the following listing:

No comments: