ph_pad PowerHome formula function
Description
Multi-purpose string padding
function.
Syntax
ph_pad ( input, type, char, len
)
Argument |
Description |
input |
String. The string to which you will "pad" characters
to. |
type |
String. The type of padding. Use "L" to leftpad the string.
Use "R" to rightpad the string. |
char |
String. The text to be used to "pad" the input. |
len
|
Long. The total desired length of the
padded string.
|
Return value
String. The input data padded by the
char data (L/R) truncated to
the len.
Usage
Use this function to left or right pad a
string to a
desired length.
Examples
The following examples demonstrate typical syntax/usage for this function.
ph_pad("arf","L","123",8) This example will
return "23123arf".
ph_pad("arf","R","123",8) This example will return
"arf12312".