Re: Left Padding Zeros In A String - VB6
- From: "Larry Serflaten" <serflaten@xxxxxxxxxxxxxx>
- Date: Thu, 19 Jan 2006 14:56:16 -0600
"Rick Rothstein [MVP - Visual Basic]"
> > I'm sure there's an easy way to do this already but am
> > not seeing it. Does anyone know of a function that exists
> > in VB6 already that allows you to pad 0's (or any
> > character) to the left of a string?
>
> You want the String$ function...
>
> Count = 10
> Character = "0"
> YourString = "Whatever"
> PaddedString = String$(HowMany, Character) & YourString
>
> If you need that to be a certain length afterwards, use the Left$ function
> on the result.
If he needs to retain the original data, he'll want to use Right$....
<g>
LFS
.
- Follow-Ups:
- Re: Left Padding Zeros In A String - VB6
- From: Rick Rothstein [MVP - Visual Basic]
- Re: Left Padding Zeros In A String - VB6
- From: Doug
- Re: Left Padding Zeros In A String - VB6
- References:
- Left Padding Zeros In A String - VB6
- From: Doug
- Re: Left Padding Zeros In A String - VB6
- From: Rick Rothstein [MVP - Visual Basic]
- Left Padding Zeros In A String - VB6
- Prev by Date: Re: Left Padding Zeros In A String - VB6
- Next by Date: Re: Problems opening Database created with other System.mdw
- Previous by thread: Re: Left Padding Zeros In A String - VB6
- Next by thread: Re: Left Padding Zeros In A String - VB6
- Index(es):
Relevant Pages
|