beautypg.com

Rept, Right, 319 rept 319 right – Apple iWork '09 User Manual

Page 319

background image

Chapter 11

Text Functions

319

REPT

The REPT function returns a string that contains a given string repeated a specified
number of times.

REPT(source-string, repeat-number)

Â

source-string: A string. source-string is a string value.

Â

repeat-number: The number of times the given string should be repeated. repeat-
number
is a number value that must be greater than or equal to 0.

Examples

=REPT(”*”, 5) returns “*****”.
=REPT(”ha”, 3) returns “hahaha”.

Related Topics
For related functions and additional information, see:

“Listing of Text Functions” on page 306

Value Types” on page 36

The Elements of Formulas” on page 15

“Using the Keyboard and Mouse to Create and Edit Formulas” on page 26

“Pasting from Examples in Help” on page 41

RIGHT

The RIGHT function returns a string consisting of the specified number of characters
from the right end of a given string.

RIGHT(source-string, string-length)

Â

source-string: A string. source-string is a string value.

Â

string-length: An optional argument specifying the desired length of the returned
string. string-length is a number value and must be greater than or equal to 1.

Usage Notes

If

Â

string-length is greater than or equal to the length of source-string, the string

returned is equal to source-string.

Examples

=RIGHT(”one two three”, 2) returns “ee”.
=RIGHT(”abc”) returns “c”.