Completes the text by the left with the fill value until obtain a text of the indicated length. Returns the resulting string. If the fill value consists of more than one character, the result can be greater than the indicated, if the total fill characters are not exactly the number of positions which had to be filled in order to obtain a text of the indicated length. The length of the fill characters is a multiple of the length of the fill string, it means that if the fill string consist in 2 characters, the total fill characters will be 2,4,6,8 ...
<text /> !
<size /> !
<fill /> !
|Etext||string||Text in which perform the search.|
|Esize||string||Length which should be completed.|
|Efill||string||String with which you should complete until the indicated position.|
|string||Returns the text or string resulting of perform the fill operation.|
requires 3 arguments, received: ...
The 3 entry parameters has not been specified.
<xsql-script name='string_rpad_sample1'> <body> <set name='text'>hello world, I'm HAL</set> <set name='size'>25</set> <set name='fill'>$</set> <println><string.rpad><text/><size/><fill/></string.rpad></println> <!-- In this another example, the total size exceeds the indicated. --> <set name='text'>hello world, I'm HAL</set> <set name='size'>25</set> <set name='fill'>XYZ</set> <println><string.rpad><text/><size/><fill/></string.rpad></println> </body> </xsql-script>
hello world, I'm HAL$$$$$ hello world, I'm HALXYZXYZ