Previous Topic: RPAD Function--Pad a String on the Right

Next Topic: RTRIM Function--Remove Trailing Spaces from a String

RPT Function--Repeat a String

The RPT function returns a string that repeats a source string the specified number of times.

Syntax

The RPT function has the following format:

RPT(source_string|number, repeat_count)

Parameters

The RPT function accepts the following parameters:

source_string (string)

This parameter can be a number; it is converted to a single character.

repeat_count (string)

Return Value

The RPT function returns a string.

Example

Return_value=RPT('Juan', 3)
Return_value='JuanJuanJuan')

Return_value=RPT('*', 10)
Return_value="**********')


Copyright © 2010 CA. All rights reserved. Email CA about this topic