General information
Category:
Coding, syntax & commands
The LSET and RSET commands can duplicate the functionality of PADL and PADR
Example:
cX = space(20): cY = "TEST"
LSET cX = cY ' Produces 20 character string beginning with 'TEST'
RSET cX = cY
I suggest making a public function, in fact:
Public Function PADL(cString as String, nLen as Length, Optional cPadChar as String) AS STRING
Dim cTemp as String
cTemp = String(nLen,Iif(cPadChar=""," ",cPadChar))
LSET cTemp = cString
PADL = cTemp
End Function
Add this to the endless list of functions VFP has built-in, that VB
doesn't...
>Hi! I would like to know the equivalent of the Foxpro functions PADR() and PADL() in VB6. Can anyone tell me or do I have to create my own? Perhaps you're using your own similar function, maybe you can share it with me? Thanks!
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only