Return to String Function Index
String Function Syntax and Examples
RPAD( )The RPAD() function adds a specified character to the right side of a string to achieve the specified length. If length is less than the length of string, the entire string is returned.
Syntax:
RPAD(string,length,char)
where:
- string is the string you want to pad
- length is the desired number of characters for the string
- char is the character to be used to pad the string. If a string or expression is specified, the first byte will be used.
Example:
input: samplestring
IMPORT @sample.dat
{RECORD
{
field1 *\r\n
}
schema1.table1
{
col1 RPAD(field1,17,'X')
col2 RPAD(field1,3,'X')
}}
Results:
schema1.table1.col1 samplestringXXXXX schema1.table1.col2 samplestring
Return to String Function Index