Firebird Documentation IndexFirebird 1.5 Language Ref. UpdateExternal functions (UDFs) → rpad
Firebird Home Firebird Home Prev: round, i64roundFirebird Documentation IndexUp: External functions (UDFs)Next: rtrim

rpad

Library: ib_udf

Added in: 1.5

Changed in: 1.5.2

Description: Returns the input string right-padded with padchars until endlength is reached.

Return type: CHAR(n)

Syntax: 

rpad (str, endlength, padchar)

Declaration: 

DECLARE EXTERNAL FUNCTION rpad
   CSTRING(255), INTEGER, CSTRING(1)
   RETURNS CSTRING(255) FREE_IT
   ENTRY_POINT 'IB_UDF_rpad' 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: round, i64roundFirebird Documentation IndexUp: External functions (UDFs)Next: rtrim
Firebird Documentation IndexFirebird 1.5 Language Ref. UpdateExternal functions (UDFs) → rpad