Firebird Documentation IndexFirebird 1.5 Language Ref. UpdateExternal functions (UDFs) → lpad
Firebird Home Firebird Home Prev: logFirebird Documentation IndexUp: External functions (UDFs)Next: ltrim

lpad

Library: ib_udf

Added in: 1.5

Changed in: 1.5.2

Description: Returns the input string left-padded with padchars 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'

Notes

  • 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.

Prev: logFirebird Documentation IndexUp: External functions (UDFs)Next: ltrim
Firebird Documentation IndexFirebird 1.5 Language Ref. UpdateExternal functions (UDFs) → lpad