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 consist of more than one character, the result can be greater than 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 is of 2 characters, the total fill characters will be 2,4,6,8 ...

1 string.lpad

<string.lpad>
    <text /> !
    <size /> !
    <fill /> !
</string.lpad>

Exceptions

requires 3 arguments, received: ...

The 3 entry parameters has not been specified.

Example
Copy
<xsql-script name='string_lpad_sample1'>
    <body>
        <set name='text'>hello world, I'm HAL</set>
        <set name='size'>25</set>
        <set name='fill'>$</set>
        <println><string.lpad><text/><size/><fill/></string.lpad></println>

        <!-- In this 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.lpad><text/><size/><fill/></string.lpad></println>
    </body>
</xsql-script>

Returns:

Copy
$$$$$hello world, I'm HAL
XYZXYZhello world, I'm HAL