Firebird Documentation Index → Firebird 1.5 Language Ref. Update → External functions (UDFs) → lpad |
Library: ib_udf
Added in: 1.5
Changed in: 1.5.2
Description: Returns the input string left-padded with padchar
s until endlength
is reached.
Return type: CHAR(n
)
Syntax:
lpad (str
,endlength
,padchar
)
Declaration:
DECLARE EXTERNAL FUNCTION lpad CSTRING(255), INTEGER, CSTRING(1) RETURNS CSTRING(255) FREE_IT ENTRY_POINT 'IB_UDF_lpad' MODULE_NAME 'ib_udf'
In Firebird 1.5.1 and below, the default declaration uses CSTRING(80) instead of CSTRING(255).
Depending on how you declare it (see CSTRING note), this function can accept and return strings of up to 32767 characters.
When calling this function, make sure endlength
does not exceed the declared result length.
Firebird Documentation Index → Firebird 1.5 Language Ref. Update → External functions (UDFs) → lpad |