See also: padC, padL |
Inserts padding on the right, returning a character string from a character expression padded to a specified length.
JSV_padR(expS, expN [, expP])
expS.padR(expN [, expP])
The padR functions returns the specified expression padded on the right side.
The padR functions use the following arguments.
Argument | Description |
expS | The character to be padded. |
expN | Specifies the total number of characters in the expression after it is padded. |
expP | The value used for padding. If expP is omitted, spaces are used for padding. If expP is included, the value of expP is repeated as necessary to pad the expression expS to a length of expN characters. |
n/a
The following lines of code
var testString = "Busy";
document.write( JSV_padR(testString, 12, "@") );
testString = "1234";
document.write( JSV_padR(testString, 12, "-") );
produce
Copyright © 1998-2000 Roaring Fork Software. All rights reserved.