# VBForums CodeBank > CodeBank - Other >  Right Pad and Left Pad in VBScript

## abhijit

VBScript doesn't have any native functions to LPAD and RPAD characters to a string. 



```


Function Lpad (inputStr, padChar, lengthStr) 
    Lpad = string(lengthStr - Len(inputStr),padChar) & inputStr 
End Function

Function Rpad (inputStr, padChar, lengthStr) 
    Rpad = inputStr & string(lengthStr - Len(inputStr), padChar) 
End Function 



```

----------

